This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid loading modules for %! and %+ on meeting %{"foo::!"} and %{"foo::+"}
authorNicholas Clark <nick@ccl4.org>
Tue, 22 Feb 2011 15:19:34 +0000 (15:19 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 22 Feb 2011 15:19:34 +0000 (15:19 +0000)
commitccdda9cbebc935188ca88f492ce8739de41d890a
tree97e8f6073c2c97e495690a6f5435de8aafd95714
parente638587ce5c7e6f5bb569dca7be9a47a83a97b9d
Avoid loading modules for %! and %+ on meeting  %{"foo::!"} and %{"foo::+"}

Previously, just %{"foo::!"} would not trigger a load of Errno, but
${"foo::!"}; %{"foo::!"}; would, due to the different code paths taken through
Perl_gv_fetchpvn_flags(). As the modules themselves are responsible for calling
tie on the relevant global variables, there never was a problem with the wrong
variables *getting* their behaviour. However, the attempted load of the XS
module Tie::Hash::NamedCapture for %{"foo::-} meant that t/op/leaky-magic.t
would not pass under minitest. This commit resolves that failure.
gv.c
t/op/magic.t