Hi!
On Tue, Oct 23, 2007 at 03:13:39PM -0400, Ken_Williams via RT wrote:
Show quoted text
I installed Module::Build from svn (0.2808_01), but it still does not work. I
now get a slightly different error message, though:
Global symbol "$x" requires explicit package name at (eval 28) line 18, <GEN6>
line 1. ...propagated at /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm
line 1026, <GEN6> line 1.
This is still caused by this line in _build/build_params of my test dist:
'alpha' => ${\$x->[2]{'dist_version'}{'qv'}},
Hm, when I remove my version.pm (and thus use the one bundled with
Module::Build::Version), the problematic line in build_params looks like this:
'alpha' => 1,
And everything works...
But when I do this:
perl -Mversion -MData::Dumper -le 'my $v=qv("0.1_1");print Dumper $v'
, the Dump looks ok:
'alpha' => 1,
After an hour of digging through Module::Build, I think I found the problem in
Module::Build::ModuleInfo around line 317. Here you call
Module::Build::Version->new($result), but if $result is already a version.pm
object, this seems to cause the strange reference
try this:
perl -MData::Dumper -Mversion -le 'my $v=qv("0.1_1");print Dumper $v;my $v2=version->new($v);print Dumper $v2'
Maybe this is a bug in version.pm, but the attached patch provides a workaround
(all tests continue to work..)
--
#!/usr/bin/perl
http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}