Re: MB 0.2805/version.pm broken on older bleadperls
On Sun, 12 Nov 2006 18:21:13 -0500, John Peacock [EMAIL PROTECTED] said: Andreas J. Koenig wrote: which will avoid the test that is freaking out. This could be applied to the M::B core (as $] and $^V will produce equivalent version objects), but I wouldn't recommend it just to support a now-expired bleadperl... Is there a price to pay? I said that $^V and $] would produce *equivalent* version objects, but that isn't the same thing as saying they are the same. $^V is an extended version object, i.e. v5.9.3, which compares identically to $], which is a floating point version, i.e. 5.009003. If you use $] everywhere, you lose the formatting as an extended version gives you... Ah thanks, I understood it the second time around:) -- andreas
MB 0.2805/version.pm broken on older bleadperls
When I try to install Module::Build for bleadperl @24713 (a version from 2005-06-06) then I can't due to the error below. Anybody know the reason and has an idea for a fix? Don't tell me that I shall install a newer version of version.pm: This fails because it depends on Module::Build :( % /home/src/perl/repoperls/installed-perls/perl/pMJJunk/[EMAIL PROTECTED]/bin/perl Build.PL Checking whether your kit is complete... Looks good Checking prerequisites... Invalid version object at (eval 8) line 282. % If running through the debugger helps... 1195: if ($modname eq 'perl') { Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1198): 1198: } elsif (eval { no strict; $status{have} = ${${modname}::VERSION} }) { Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1198): 1198: } elsif (eval { no strict; $status{have} = ${${modname}::VERSION} }) { Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1215): 1215: my @conditions = $self-_parse_conditions($spec); Module::Build::Base::_parse_conditions(lib/Module/Build/Base.pm:1182): 1182: my ($self, $spec) = @_; Module::Build::Base::_parse_conditions(lib/Module/Build/Base.pm:1184): 1184: if ($spec =~ /^\s*([\w.]+)\s*$/) { # A plain number, maybe with dots, letters, and underscores Module::Build::Base::_parse_conditions(lib/Module/Build/Base.pm:1185): 1185: return (= $spec); Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1217): 1217: foreach (@conditions) { Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1218): 1218: my ($op, $version) = /^\s* (=?|=?|==|!=) \s* ([\w.]+) \s*$/x 1219: or die Invalid prerequisite condition '$_' for $modname; Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1221): 1221: $version = $self-perl_version_to_float($version) 1222: if $modname eq 'perl'; Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1224): 1224: next if $op eq '=' and !$version; # Module doesn't have to actually define a $VERSION Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1232): 1232: $status{ok} = 1; Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1233): 1233: return \%status; Module::Build::Base::prereq_failures(lib/Module/Build/Base.pm:1089): 1089: if ($type =~ /^(?:\w+_)?conflicts$/) { Module::Build::Base::prereq_failures(lib/Module/Build/Base.pm:1100): 1100: next if $status-{ok}; Module::Build::Base::prereq_failures(lib/Module/Build/Base.pm:1087): 1087: my $status = $self-check_installed_status($modname, $spec); Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1192): 1192: my ($self, $modname, $spec) = @_; Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1193): 1193: my %status = (need = $spec); Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1195): 1195: if ($modname eq 'perl') { Module::Build::Base::check_installed_status(lib/Module/Build/Base.pm:1196): 1196: $status{have} = $self-perl_version; Module::Build::Base::perl_version(lib/Module/Build/Base.pm:1167): 1167: my ($self) = @_; Module::Build::Base::perl_version(lib/Module/Build/Base.pm:1171): 1171: return $^V ? $self-perl_version_to_float(sprintf %vd, $^V) : $]; version::vpp::stringify((eval 10)[lib/Module/Build/Version.pm:28]:280): 280:my ($self) = @_; version::vpp::stringify((eval 10)[lib/Module/Build/Version.pm:28]:281): 281:unless (_verify($self)) { version::vpp::_verify((eval 10)[lib/Module/Build/Version.pm:28]:383): 383:my ($self) = @_; version::vpp::_verify((eval 10)[lib/Module/Build/Version.pm:28]:384): 384:if ( Scalar::Util::reftype($self) eq 'HASH' 385: exists $self-{version} 386: ref($self-{version}) eq 'ARRAY' 387:) { version::vpp::_verify((eval 10)[lib/Module/Build/Version.pm:28]:391): 391:return 0; version::vpp::stringify((eval 10)[lib/Module/Build/Version.pm:28]:282): 282:die Invalid version object; Invalid version object at (eval 10)[lib/Module/Build/Version.pm:28] line 282. Debugged program terminated. Use q to quit or R to restart, Thanks, -- andreas
Re: MB 0.2805/version.pm broken on older bleadperls
John Peacock wrote: I backrev'd my p4 checkout to that rev and I'll try to build bleadperl and then get Module::Build to play nice if I can. It's kind of a stretch, though, to try and maintain compatibility with random bleadperl releases, which by default and design are not intended to be considered stable releases. OK, here's the story: back in 2005-06-06, the version object was much simpler (it was just a blessed array). And $^V returned one of those simpler version objects at that time, which Module::Build's version.pm code has no clue how to deal with (it expects version objects to be hashes, not arrays). We can special case this in the Module::Build code, but I'm really not sure it's worth putting it in the released code, since bleadperl has moved on from that time in an incompatible fashion. For your testing purposes only, apply the following patch: === lib/Module/Build/Base.pm == --- lib/Module/Build/Base.pm(revision 1980) +++ lib/Module/Build/Base.pm(local) @@ -1168,7 +1168,7 @@ # Check the current perl interpreter # It's much more convenient to use $] here than $^V, but 'man # perlvar' says I'm not supposed to. Bloody tyrant. - return $^V ? $self-perl_version_to_float(sprintf %vd, $^V) : $]; + return $]; } which will avoid the test that is freaking out. This could be applied to the M::B core (as $] and $^V will produce equivalent version objects), but I wouldn't recommend it just to support a now-expired bleadperl... John -- John Peacock Director of Information Research and Technology Rowman Littlefield Publishing Group 4501 Forbes Blvd Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747
Re: MB 0.2805/version.pm broken on older bleadperls
Andreas J. Koenig wrote: which will avoid the test that is freaking out. This could be applied to the M::B core (as $] and $^V will produce equivalent version objects), but I wouldn't recommend it just to support a now-expired bleadperl... Is there a price to pay? I said that $^V and $] would produce *equivalent* version objects, but that isn't the same thing as saying they are the same. $^V is an extended version object, i.e. v5.9.3, which compares identically to $], which is a floating point version, i.e. 5.009003. If you use $] everywhere, you lose the formatting as an extended version gives you... John -- John Peacock Director of Information Research and Technology Rowman Littlefield Publishing Group 4501 Forbes Blvd Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747