What steps will reproduce the problem? 1. > perlcc -r -e 'use Storable; *Storable::CAN_FLOCK = sub { 1 } if $ENV{fake}; print qq{check ok\n}' Subroutine import redefined at /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.3/i386-linux-64int/Config.pm line 38. check ok
What is the expected output? What do you see instead?
> perl -e 'use Storable; *Storable::CAN_FLOCK = sub { 1 } if $ENV{fake}; print qq{check ok\n}' check ok
Please use labels and text to provide additional information.
Comment #1
Posted on Nov 12, 2013 by Massive Lion(No comment was entered for this change.)
Comment #2
Posted on Nov 12, 2013 by Massive Bearminimal script to reproduce the problem
cat script.pl
sub can { require Config; import Config; return $Config{'d_flock'}; }
use IO::File; my $x = $ENV{fake} ? IO::File->new : undef ;
can() if $ENV{fake}; print "ok\n";
1;
Comment #3
Posted on Nov 12, 2013 by Grumpy RhinoFirst will have to add the special case #183 for ->import methods
Comment #4
Posted on Nov 12, 2013 by Grumpy RhinoWorkaround: use -UConfig in the cmdline
Comment #5
Posted on Nov 14, 2013 by Grumpy RhinoIssue 221 has been merged into this issue.
Comment #6
Posted on Nov 14, 2013 by Grumpy Rhino(No comment was entered for this change.)
Comment #7
Posted on Nov 14, 2013 by Grumpy RhinoInterestingly fixed by adding -v,-Dp
Comment #8
Posted on Nov 14, 2013 by Grumpy Rhino%INC is wrong
Comment #9
Posted on Nov 14, 2013 by Grumpy RhinoIssue 221 has been merged into this issue.
Comment #10
Posted on Nov 14, 2013 by Massive LionPossibly related to issue 219. I think the problem goes away once that's resolved.
Comment #11
Posted on Nov 14, 2013 by Grumpy RhinoI see now what's going on:
initializing *!, *+ or *- too early when *INC is not yet setup will lead to all these problems. %INC is wrong (redefinition or not found warnings), *! fails to initialize. So the bisect indeed points to the right commit
Comment #12
Posted on Nov 18, 2013 by Grumpy RhinoTracked in #27, first testcase.
I guess the reason is wrong handling of GV imports (aliases). We don't share shared GPs yet, and the EGV of *DynaLoader::Config seems to be missing in this case. But even if we had the EGV the shared GP will be a copy, and not shared.
Status: Duplicate
Labels:
Type-Defect
Priority-Critical
Milestone-NextRelease