develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [PATCH] %open::modes to hold ${^OPEN} values for run-time access

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
January 29, 2003 02:42
Subject:
Re: [PATCH] %open::modes to hold ${^OPEN} values for run-time access
Message ID:
20030129114140.260031a4.rgarciasuarez@free.fr
Autrijus Tang <autrijus@autrijus.org> wrote:
> The attached patch implements the %open::modes hash, which holds
> the compile time values for IN and OUT layers for run-time access.

Ah, the old problem, run-time access to compile-time hints.

I object to your solution, (at least for 5.9.0), because it doesn't work
in edge cases, and it's needed only because you don't have run-time
access to the compile-time values of %^H.

A better solution would be :

1- store the info you need in %^H (I notice that $^H{open_IN} and
   $^H{open_OUT} are already used)
2- provide some mechanism to access at run-time the compile-time
   values of %^H.

Of course, '2' is the tricky point here.

Implementing '2' will also allow to fix some other bugs (scoping of the
sort pragma, for example) and to implement other cool stuff (user
pragmas, better B:: backends, run-time optimizers, etc.)

I'm working on it. From time to time, I struggle with magic hashes and
such. Unfortunately, a bunch of combined factors prevented me to
progress lately.

Can you perlbug your wish, so it's RT-tracked ?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About