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

Re: PRAGMA musing: "no scope"

Thread Previous | Thread Next
Ilya Zakharevich
November 19, 1999 21:52
Re: PRAGMA musing: "no scope"
Message ID:
Larry Wall writes:
> Offhand, I think I'd rather see something that explicitly puts things
> into the currently compiling scope, bypassing however many levels
> necessary to do that.

This is what Module->import is doing now (if it modifies $^H, %^H).  See
my example

BEGIN {  require strict;
	 strict->import('vars') if $^O eq 'pdp';

It will propagate strictness into whatever is compiled when ->import
is called (it is the enclosing scope of BEGIN - indeed, BEGIN is
*already compiled* when strict->import('vars') is called).


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