On Fri, Apr 24, 2009 at 15:53, Chas. Owens <chas.ow...@gmail.com> wrote: snip > All of this is good information, but for one thing: not all pragmas > are lexically scoped. Hence the need to test and/or read the docs. > For instance, the re pragma[1] is only partially lexical: > > #!/usr/bin/perl > > use strict; > use warnings; > > "foo" =~ /(o+)/; #re 'debug' still affects this line > > use re 'debug'; > > 1. http://perldoc.perl.org/re.html snip
The sigtrap pragma is another example of a pragma that is not lexically scoped. The docs don't say one way or the other, but a quick test proves that it isn't: #!/usr/bin/perl use strict; use warnings; kill 2, $$; sub not_even_called { use sigtrap die => "INT"; } -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/