Autrijus Tang <autrijus@autrijus.org> writes: >On Wed, Jan 29, 2003 at 01:18:26PM +0100, Rafael Garcia-Suarez wrote: >> > Autrijus Tang <autrijus@autrijus.org> 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 >Devel::Hints? > >/Autrijus/ >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.1 (FreeBSD) > >iD8DBQE+N/I0tLPdNzw1AaARAmvmAJ0aj4A2/SgU5Z77IwHWyuwNPZ3OzgCfQX+6 >p2m3Ebm83dy7U1yfibmXVuc= >=5ELa >-----END PGP SIGNATURE----- -- Nick Ing-Simmons http://www.ni-s.u-net.com/Thread Previous | Thread Next