Subject: | Cannot open : No such file or directory at C:/perl/site/lib/Module/ScanDeps.pm line 477. |
Date: | Thu, 11 Jan 2007 11:39:00 -0500 |
To: | bug-Module-ScanDeps [...] rt.cpan.org |
From: | Malcolm Nooning <m.nooning [...] comcast.net> |
Hello,
I installed the newest ScanDeps.pm, 0.71 today. One of my scripts that
work pp - Perl Packager now breaks. I get the line
Cannot open : No such file or directory at
C:/perl/site/lib/Module/ScanDeps.pm line 477.
This was also the case of 0.70, so, too long ago to remember, I put in
the "next if ($file eq ""); " line shown in the paste below. If fixes
0.71 for me, too.
---------paste
foreach my $file (@{$files}) {
next if ($file eq ""); #xxxxxxxx mhn Line 471
my $key = shift @{$keys};
-------------end paste
If you also put in the line "print ("file is :$file:\n");" just after
the foreach, you will see that there are a number of null values for
$file. I mean, you would see them if you were running one of my old
scripts.
I used the -M switch quite a bit in some of my old scripts because it
used to be that pp needed it. I am guessing that is somehow the origins
of the problem. I do not want to change legacy code that works. I
would rather just add the "next if ($file eq ""); ".