develooper Front page | perl.perl5.porters | Postings from October 1999

Re: PERL_HEADER env varb: was: Addition to @INC

Thread Previous | Thread Next
Ed Peschko
October 21, 1999 16:38
Re: PERL_HEADER env varb: was: Addition to @INC
Message ID:
>> Suppose you want to export a certain module everywhere, so it is 
>> visible to each scope. (Dumper, strict, whatever). What would really
>> be necessary is having these 'use' statements attached to each 'package'
>> statement.
>Then you're SURE to break things, because all of those modules would
>end up imported into every single module, certainly including some
>that just don't want things imported into them, thank you very much.

Ok, then I guess the best way around this (assuming that you want to enforce 
control on something like 'use strict') is to have the option to put PERL5OPT 
in the executable, and then have a 'Common' module which contains horrifically 
obscure code to insert the 'use' statements into each and every right 
namespace. Is there a list of namespaces lying around someplace? Would this work
for strict?

(Although, to tell you the truth my experience a pragma to insert all of this 
stuff into every namespace wouldn't break much - I'm not sure about other
people's modules, but I sure as hell don't use 'IO', 'DBI', or GetOptions, or 
Dumper as local functions.)


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