Skip Menu |

This queue is for tickets about the Object-InsideOut CPAN distribution.

Report information
The Basics
Id: 89325
Status: resolved
Priority: 0/
Queue: Object-InsideOut

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.98
Fixed in: 3.99



Subject: Minimal Scalar::Util version gets set from current version
The META.* files list 1.32 as a Scalar::Util minimal required version. I wondered why the version changed since older Object-InsideOut release. The reason is the Makefile.PL injects version of Scalar::Util which presents on the host creating the distributed tar archive: WriteMakefile( 'PREREQ_PM' => { 'Scalar::Util' => $Scalar::Util::VERSION, } ); This construction is used due to previous manual check: # Check for Scalar::Util::weaken() eval { require Scalar::Util; }; if ($@) { # Not found - require minimum version $Scalar::Util::VERSION = 1.23; } elsif (! Scalar::Util->can('weaken')) { # Scalar::Util is 'pure Perl' version if ($Scalar::Util::VERSION ge '1.20') { die <<_NO_WEAKEN_; You must reinstall Scalar::Util in order to install Object::InsideOut because the currently installed Scalar::Util is a 'pure perl' version that is missing the 'weaken()' function. _NO_WEAKEN_ } $Scalar::Util::VERSION = 1.23; } The code has the problem it does not set $Scalar::Util::VERSION if Scalar::Util with weaken is installed. I propose to extend the code with final branch: elseif { $Scalar::Util::VERSION = 1.23; }
Thanks. I'll fix this in the next release.
Fixed in 3.99 which is now available on CPAN. On 2013-10-08 02:25:45, ppisar wrote: Show quoted text
> The META.* files list 1.32 as a Scalar::Util minimal required version. > I wondered why the version changed since older Object-InsideOut > release. > > The reason is the Makefile.PL injects version of Scalar::Util which > presents on the host creating the distributed tar archive: > > WriteMakefile( > 'PREREQ_PM' => { > 'Scalar::Util' => $Scalar::Util::VERSION, > } > ); > > This construction is used due to previous manual check: > > # Check for Scalar::Util::weaken() > eval { require Scalar::Util; }; > if ($@) { > # Not found - require minimum version > $Scalar::Util::VERSION = 1.23; > } elsif (! Scalar::Util->can('weaken')) { > # Scalar::Util is 'pure Perl' version > if ($Scalar::Util::VERSION ge '1.20') { > die <<_NO_WEAKEN_; > You must reinstall Scalar::Util in order to install Object::InsideOut > because the currently installed Scalar::Util is a 'pure perl' version > that is missing the 'weaken()' function. > _NO_WEAKEN_ > } > $Scalar::Util::VERSION = 1.23; > } > > The code has the problem it does not set $Scalar::Util::VERSION if > Scalar::Util with weaken is installed. I propose to extend the code > with final branch: > > elseif { > $Scalar::Util::VERSION = 1.23; > }