Damian Conway wrote: > proper lexically-scoped modules. sub foo { print "outer foo\n"}; { local *foo = sub {print "inner foo\n"}; foo(); }; foo(); did what I wanted it to. Should I extend Pollute:: to make this possible: in file Localmodules.pm: use Pollutte::Locally; use Carp; and in blarf.pl: sub Carp {print "outer carp\n"}; { use Localmodules.pm; local *{$_} foreach @PolluteList; Pollute(); Carp("Inner Carp"); # goes to STDERR } Carp(); #prints "outer carp\n" Or is that just too complex. Local must be visible at compile-time I suppose. local use Carp; is how local import should look IMO, that might have gotten into an RFC -- David Nicol 816.235.1187 Refuse to take new work - finish existing work - shut down.
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Ken Fox
- Re: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Ken Fox
- RE: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? David L. Nicol
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Bart Lateur
- Re: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Garrett Goebel
- Re: What's up with %MY? Dan Sugalski
- Re: What's up with %MY? Ken Fox
- Re: What's up with %MY? Uri Guttman
- Re: What's up with %MY? Dan Sugalski