LanX has asked for the wisdom of the Perl Monks concerning the following question:
Is it documented behaviour?
use strict; use warnings; use B::Deparse; sub test { use set my $y =666; print $y; } #test(); print B::Deparse->new()->coderef2text(\&test);
Global symbol "$y" requires explicit package name at d:/exp/t_set.pl a +borted due to compilation errors. ["set", 666]
exec 't_set.pl' unless caller; package set; use strict; use warnings; use Data::Dump qw/dd pp/; sub import { dd \@_; } 1;
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: use has it's own scope?
by Anonymous Monk on Aug 07, 2017 at 22:18 UTC | |
by LanX (Saint) on Aug 07, 2017 at 22:35 UTC | |
by Eily (Monsignor) on Sep 06, 2017 at 09:43 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |