Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 30004
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: domm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.2808
Fixed in: (no value)



Subject: Module::Build dies on dists using version.pm and development versions
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1192433917-11235-3"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 948
Download (untitled) / with headers
text/plain 948b
When using version.pm and a version number containing a development version, ./Build dies: ~/MB-Bug$ ./Build Global symbol "$VAR1" requires explicit package name at (eval 23) line 18, <GEN6> line 1. ...propagated at /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 1015, <GEN6> line 1. This seems to be caused by a back-reference in _build/build_params: 'alpha' => ${\$VAR1->[2]{'dist_version'}{'qv'}}, I've attached a tarball containing a dist illustrating the bug. It uses: use version;our $VERSION = qv('0.01_1'); I've also attached a patch that fixes that issue by adding no strict 'vars' around the part where build_params is read back in (Module::Build::Base::read_config) Maybe it would be better to ensure that the output of Data::Dumper is parsable without this workaround. I tried Data::Dumper::Purity and Data::Dumper::Deepcopy, but neither seemed to work... Hope this helps, and thanks for Module::Build!
Subject: version_patch.module_build_0.2808
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1192433917-11235-2"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="version_patch.module_build_0.2808"
Content-Disposition: inline; filename="version_patch.module_build_0.2808"
Content-Transfer-Encoding: base64
Content-Length: 610
Download version_patch.module_build_0.2808
application/octet-stream 610b

Message body not shown because it is not plain text.

Subject: test-dist.tgz
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1192433369-11205-7"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/x-gzip; name="test-dist.tgz"
Content-Disposition: inline; filename="test-dist.tgz"
Content-Transfer-Encoding: base64
Content-Length: 2934
Download test-dist.tgz
application/x-gzip 2.8k

Message body not shown because it is not plain text.

MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VERIFIED,DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-30004 [...] rt.cpan.org> <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: iso-8859-1
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id AB6814D803E for <bug-Module-Build [...] rt.cpan.org>; Mon, 15 Oct 2007 13:36:55 -0400 (EDT)
Received: (qmail 16847 invoked by alias); 15 Oct 2007 17:36:54 -0000
Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.180) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 15 Oct 2007 10:36:40 -0700
Received: by wa-out-1112.google.com with SMTP id m28so2203067wag for <bug-Module-Build [...] rt.cpan.org>; Mon, 15 Oct 2007 10:36:23 -0700 (PDT)
Received: by 10.114.160.1 with SMTP id i1mr7270443wae.1192469783590; Mon, 15 Oct 2007 10:36:23 -0700 (PDT)
Received: from mjolnir.scratchcomputing.com ( [71.111.49.155]) by mx.google.com with ESMTPS id l36sm8583501waf.2007.10.15.10.36.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2007 10:36:22 -0700 (PDT)
Delivered-To: cpan-bug+module-build [...] diesel.bestpractical.com
User-Agent: KMail/1.9.5
Subject: Re: [rt.cpan.org #30004] Module::Build dies on dists using version.pm and development versions
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=nzjum4CB/tTQKITM1KEMc1OE551m7CilsCA2UY5lNT3EKU+Hmhc8XIBv8aY2WJJX0QBf91SVkfhODFieIDGzNFTMs2V6UocuQu0TF2mPEMxrhVMrLktfuTjDwxuhZSBKCz4UDP/amVGfc1bnvwQGJi96N6rrDd++wpgmB3RSfpE=
Return-Path: <scratchcomputing [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; bh=yZNoi2w39dyqwANZWs6QFJBFZkOhOoDjpNoQtiC0Has=; b=JYwiZlNku72rCE0VfnggLU8SVUtkLkbybsTYsnAi5EldPemtrK+zbhVssm+LJVL+Ar4+wTCU1E1w51ycEJ72PX0IkdcxxRqnFaVs0xpiGYYdVH3OrVLs5T1WslqHM1b4u2EI7gj66cUxVCAn8xTIzj48QKsl/3Sm70TAJIKQ33A=
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Mon, 15 Oct 2007 10:37:39 -0700
Message-Id: <200710151037.39753.ewilhelm [...] cpan.org>
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Eric Wilhelm <scratchcomputing [...] gmail.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-18552-1192469823-574.30004-0-0 [...] rt.cpan.org>
Content-Length: 654
Download (untitled) / with headers
text/plain 654b
# from Thomas Klausner via RT # on Monday 15 October 2007 00:39: Show quoted text
>When using version.pm and a version number containing a development >version, ./Build dies: > >  ~/MB-Bug$ ./Build >  Global symbol "$VAR1" requires explicit package name at (eval 23) >  line 18, <GEN6> line 1. ...propagated at >  /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 1015, > <GEN6> line 1.
I can replicate that here with either 0.2808 or svn. But NOTE -- version.pm must be the compiled vxs.pm. perl -le 'use version; print $INC{"version/vxs.pm"}' With the pure-perl vpp.pm, it doesn't happen: perl -le 'use version; print $INC{"version/vpp.pm"}' --Eric
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-18552-1192469823-574.30004-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-9653-1193166789-91.30004-0-0 [...] rt.cpan.org>
References: <RT-Ticket-30004 [...] rt.cpan.org> <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org> <200710151037.39753.ewilhelm [...] cpan.org> <rt-3.6.HEAD-18552-1192469823-574.30004-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 100
Download (untitled) / with headers
text/plain 100b
I've committed some more Data::Dumper fixes that should fix this, want to try again? Thanks. -Ken
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-9653-1193166789-91.30004-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
References: <RT-Ticket-30004 [...] rt.cpan.org> <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org> <200710151037.39753.ewilhelm [...] cpan.org> <rt-3.6.HEAD-18552-1192469823-574.30004-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-9653-1193166789-91.30004-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-7020-1193214817-643.30004-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1193214817-7020-1"
From: DOMM [...] cpan.org
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1404
Download (untitled) / with headers
text/plain 1.3k
On Tue Oct 23 15:13:21 2007, KWILLIAMS wrote: Show quoted text
> I've committed some more Data::Dumper fixes that should fix this, want > to try again?
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..)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: multipart/mixed; boundary="----------=_1193214760-7020-0"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="module_build_version.patch"
Content-Disposition: inline; filename="module_build_version.patch"
Content-Transfer-Encoding: base64
Content-Length: 582
Index: lib/Module/Build/ModuleInfo.pm =================================================================== --- lib/Module/Build/ModuleInfo.pm (revision 10110) +++ lib/Module/Build/ModuleInfo.pm (working copy) @@ -313,7 +313,11 @@ die "failed to build version sub for $self->{filename}"; my $result = $vsub->(); - # Bless it into our own version class + # Bless it into our own version class unless we already have a version + # object + if (ref($result) eq 'version') { + return $result; + } $result = Module::Build::Version->new($result); return $result;
X-Warum.net-Mailscanner-Information: Please contact Warum.net for more information
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-9653-1193166789-91.30004-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-30004 [...] rt.cpan.org> <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org> <200710151037.39753.ewilhelm [...] cpan.org> <rt-3.6.HEAD-18552-1192469823-574.30004-6-0 [...] rt.cpan.org> <rt-3.6.HEAD-9653-1193166789-91.30004-6-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="so9zsI5B81VjUb/o"
X-Warum.net-Mailscanner: Found to be clean
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id A6F7D4D81C7 for <bug-Module-Build [...] rt.cpan.org>; Wed, 24 Oct 2007 04:38:37 -0400 (EDT)
Received: (qmail 29099 invoked by alias); 24 Oct 2007 08:36:32 -0000
Received: from statler.bestheads.com (HELO wennja.warum.net) (83.65.255.36) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 24 Oct 2007 01:36:13 -0700
Received: from localhost (IDENT:nobody [...] statler.bestheads.com [83.65.255.36]) by wennja.warum.net (8.14.0/8.13.7) with ESMTP id l9O8a5i4004147 for <bug-Module-Build [...] rt.cpan.org>; Wed, 24 Oct 2007 10:36:05 +0200
Delivered-To: cpan-bug+module-build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #30004] Module::Build dies on dists using version.pm and development versions
User-Agent: Mutt/1.5.16 (2007-06-09)
Return-Path: <domm [...] cpan.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
X-Warum.net-Mailscanner-From: domm [...] cpan.org
X-Old-Spam-Status: No, hits=0.1 required=4.0
Date: Wed, 24 Oct 2007 10:35:21 +0200
Message-Id: <20071024083521.GY9715 [...] d610.chello.at>
X-Spam-Checker-Version: SpamAssassin 3.1.8-gr0 (2007-02-13) on wennja
To: Ken_Williams via RT <bug-Module-Build [...] rt.cpan.org>
From: Thomas Klausner <domm [...] cpan.org>
RT-Message-ID: <rt-3.6.HEAD-7052-1193215302-1926.30004-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
X-RT-Original-Encoding: us-ascii
X-RT-Original-Encoding: utf-8
Content-Length: 1614
Download (untitled) / with headers
text/plain 1.5k
Hi! On Tue, Oct 23, 2007 at 03:13:39PM -0400, Ken_Williams via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=30004 > > > I've committed some more Data::Dumper fixes that should fix this, want to try again?
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$_.$/}
Content-Type: text/plain; charset="utf-8"
content-disposition: attachment; filename="module_build_version.patch"
X-RT-Original-Encoding: us-ascii
X-RT-Original-Encoding: utf-8
Content-Length: 582

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-7052-1193215302-1926.30004-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <RT-Ticket-30004 [...] rt.cpan.org> <rt-3.6.HEAD-11235-1192433946-464.30004-4-0 [...] rt.cpan.org> <200710151037.39753.ewilhelm [...] cpan.org> <rt-3.6.HEAD-18552-1192469823-574.30004-6-0 [...] rt.cpan.org> <rt-3.6.HEAD-9653-1193166789-91.30004-6-0 [...] rt.cpan.org> <20071024083521.GY9715 [...] d610.chello.at> <rt-3.6.HEAD-7052-1193215302-1926.30004-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-23378-1193273396-1934.30004-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: JPEACOCK [...] cpan.org
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 680
Download (untitled) / with headers
text/plain 680b
On Wed Oct 24 04:41:42 2007, DOMM wrote: Show quoted text
> 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
This was a bug in the XS form of version.pm (so using the pure Perl version.pm built into M::B would work fine). I just released 0.74 to CPAN with the following fix: Log: Data::Dumper is sometimes too clever for its (and our) own good. When copying an existing version object, directly set newSViv for qv and/or alpha, instead of using &PL_sv_yes, since the latter has a PV slot which looks shared to D::D's jaundiced eye.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-23333-1193338342-189.30004-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 94
Fixed in svn r10121. We now require version.pm 0.74 or else we use our embedded vpp.pm code.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.