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

Re: PRAGMA musing: "no scope"

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
November 19, 1999 21:52
Subject:
Re: PRAGMA musing: "no scope"
Message ID:
199911200552.AAA24966@monk.mps.ohio-state.edu
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).

Ilya

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