Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 109110
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: Ralf.Neubauer [...] wido.bv.aok.de
Cc:
AdminCc:

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



Subject: Incompatible with Module::ScanDeps 1.20
Date: Wed, 18 Nov 2015 13:48:53 +0000
To: "bug-PAR-Packer [...] rt.cpan.org" <bug-PAR-Packer [...] rt.cpan.org>
From: "Neubauer, Ralf" <ralf.neubauer [...] wido.bv.aok.de>
Using pp results in: Can't use string ("1") as an ARRAY ref while "strict refs" in use at c:/strawberry-5.22.0.1-32/perl/site/lib/Module/ScanDeps.pm line 1085. This code in PAR-Packer-1.026: my $preload = Module::ScanDeps::_get_preload($module) or next; $add_deps->( used_by => $file, rv => \%map, modules => $preload, skip => \%skip, # warn_missing => $args->{warn_missing}, ); push @files, map {&$inc_find($_)} @$preload; is incompatible with the change in Module:ScanDeps between version 1.19 and 1.20: 1.19: sub _get_preload { my $pm = shift; my $preload = $Preload{$pm} or return(); if ($preload eq 'sub') { $pm =~ s/\.p[mh]$//i; $preload = [ _glob_in_inc($pm, 1) ]; } elsif (UNIVERSAL::isa($preload, 'CODE')) { $preload = [ $preload->($pm) ]; } return $preload; } 1.20: sub _get_preload { my ($pm, $seen) = @_; $seen ||= {}; $seen->{$pm}++; my @preload; foreach $pm (_get_preload1($pm)) { next if $seen->{$pm}; $seen->{$pm}++; push @preload, $pm, _get_preload($pm, $seen); } return @preload; } Changing the above code to my @preload = Module::ScanDeps::_get_preload($module) or next; $add_deps->( used_by => $file, rv => \%map, modules => \@preload, skip => \%skip, # warn_missing => $args->{warn_missing}, ); push @files, map {&$inc_find($_)} @preload; seems to help, but of course needs Module-ScanDeps-1.20 . Ralf
On 2015-11-18 08:49:08, Ralf.Neubauer@wido.bv.aok.de wrote: Show quoted text
> Using pp results in: > > Can't use string ("1") as an ARRAY ref while "strict refs" in use at > c:/strawberry-5.22.0.1-32/perl/site/lib/Module/ScanDeps.pm line 1085.
Thanks for reminding me, the adjustment was already on my disk. Fixed in PAR::Packer, just released to CPAN. Cheers, Roderich