Skip Menu |

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

Report information
The Basics
Id: 49007
Status: resolved
Priority: 0/
Queue: Module-ScanDeps

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

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



Subject: This module emits a lot of uninitialized value warnings
I've attached a patch which shuts up all the warnings I've seen. All tests still pass.
Subject: msd.diff
Index: lib/Module/ScanDeps.pm =================================================================== --- lib/Module/ScanDeps.pm (revision 1089) +++ lib/Module/ScanDeps.pm (working copy) @@ -647,7 +647,7 @@ while ($recurse) { my $count = keys %$rv; - my @files = sort grep -T $_->{file}, values %$rv; + my @files = sort grep { defined $_->{file} && -T $_->{file} } values %$rv; scan_deps_static({ files => [ map $_->{file}, @files ], keys => [ map $_->{key}, @files ], @@ -1007,9 +1007,11 @@ next if $_->{name} =~ m/(?:^|\/)\.(?:exists|packlist)$/; my ($ext,$type); $ext = lc($1) if $_->{name} =~ /(\.[^.]+)$/; - next if $ext eq lc(lib_ext()); - $type = 'shared' if $ext eq lc(dl_ext()); - $type = 'autoload' if ($ext eq '.ix' or $ext eq '.al'); + if (defined $ext) { + next if $ext eq lc(lib_ext()); + $type = 'shared' if $ext eq lc(dl_ext()); + $type = 'autoload' if ($ext eq '.ix' or $ext eq '.al'); + } $type ||= 'data'; _add_info( rv => $rv, module => "auto/$path/$_->{name}", @@ -1023,6 +1025,7 @@ sub _find_in_inc { my $file = shift; + return unless defined $file; foreach my $dir (grep !/\bBSDPAN\b/, @INC, @IncludeLibs) { return "$dir/$file" if -f "$dir/$file";
On Tue Aug 25 18:24:10 2009, DROLSKY wrote: Show quoted text
> I've attached a patch which shuts up all the warnings I've seen. All > tests still pass.
Hi Dave, thanks for stepping in and providing a patch. I applied it, but I new release will be blocking on another small, pending fix. Feel free to poke me in case I forget. Cheers, Steffen