in reply to Re^8: use has it's own scope?
in thread use has it's own scope?

Doesn't keeping the elements in @_ basically have the same effect since they are aliases to the values in the use statement?

package Set; sub import { our $var = \$_[1]; } 1;
With this module, perl -e "use Set (my $x = 6,); $$Set::var++; will work but perl -e "use Set (6,); $$Set::var++;

will fail because "Modification of a read-only value attempted at -e line 1."

Replies are listed 'Best First'.
Re^10: use has it's own scope?
by LanX (Saint) on Sep 08, 2017 at 14:13 UTC
    ( /me diabolic laughter ;-)

    yes, I will link to my YAPC talk as soon that I find it on youtube. :)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!