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

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

Thread Previous | Thread Next
Nick Ing-Simmons
February 1, 2003 02:44
Re: [PATCH] %open::modes to hold ${^OPEN} values for run-time access
Message ID:
Autrijus Tang <> writes:
>On Wed, Jan 29, 2003 at 01:18:26PM +0100, Rafael Garcia-Suarez wrote:
>> > Autrijus Tang <> wrote:
>> > 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.
>That's fine with me, as your solution seems much generally useful. :-)
>> > 2- provide some mechanism to access at run-time the compile-time
>> >    values of %^H.
>> The function getOPEN() here returns the value of ${^OPEN}
>> under which it has been compiled. Is that the info you want, and
>> is it suitable for you ? (I'm not sure why I've put a SvREFCNT_inc
>> here, I'll have to look.)
>Yes, and yes.  The fact that it's C-based is slightly bad,
>but I guess that's what it takes.

We can have this C code along with the other hooks into PerlIO 
if it makes sense - we already have an open:: name space 
the existing code in perlio.c which installs some XSUBS could 
install open::get - suggestions for better name welcome.

>> If you (and others) find this snippet useful, I can release it
>> to CPAN. (I've *no idea* about a proper module name for it.)
>How about extenting it to other members than ->cop_io, and call it
>Version: GnuPG v1.2.1 (FreeBSD)
Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About