in reply to Logic for importing and strict vars?
To add a little strangeness; for your third proposition, on v5.10 Linux I get:
but I don't on v5.26 Windows :)Name "blah::a" used only once: possible typo at -e line 1.
All I can say is that with B::Deparse the package prefix seems to be removed,
The output is exactly the same if I add package main; before setting *::x. (Also it replaces the $x++ by $main::x++, which would actually be valid code...) This might just be an optimization gone wrong?perl -MO=Deparse -wMstrict -e "BEGIN { *::x=\$a } $x++" ... BEGIN { $^W = 1; } use strict; sub BEGIN { *x = \$a; } $main::x++;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Logic for importing and strict vars?
by Veltro (Hermit) on Feb 27, 2019 at 11:16 UTC | |
by Eily (Monsignor) on Feb 27, 2019 at 13:22 UTC | |
Re^2: Logic for importing and strict vars?
by haukex (Archbishop) on Feb 28, 2019 at 08:37 UTC |