Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: alexandrfedorov [...] gmail.com
Cc:
AdminCc:

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



Subject: Problem with "eval { require SomeModule }" constructions
Please fill out a real bug report and not some crappy pastebin URL.
I'm sorry. Today check my script "scandeps.pl -c parser.pl" and found such a problem: fileparse(): need a valid pathname at C:/strawberry/perl/site/lib/Module/ScanDeps/DataFeed.pm line 57 END failed--call queue aborted. SYSTEM ERROR in compiling parser.pl: 65280 at C:/strawberry/perl/site/lib/Module/ScanDeps.pm line 1239. some time later i've discovered that it's because some values of %INC was undefined like (see last value): "subs.pm", "C:/strawberry/perl/lib/subs.pm", "warnings/register.pm", "C:/strawberry/perl/lib/warnings/register.pm", "Exporter.pm", "C:/strawberry/perl/lib/Exporter.pm", "vars.pm", "C:/strawberry/perl/lib/vars.pm", "strict.pm", "C:/strawberry/perl/lib/strict.pm", "Params/ValidateXS.pm", undef i look in parent of this module Params::Validate and see construction: ... eval { require Params::ValidateXS } ... Params::ValidateXS has errors in windows and it returns with error, so i let's look in http://perldoc.perl.org/functions/require.html at code of require sub: if ($@) { $INC{$filename} = undef; die $@; when required module has errors, require sub undefs value in %INC and died, but eval doesn't break program flow, so we have undefs in %INC and errors in your great module. So i think that you need to add some check for undefined values. I solved this by patching Module::ScanDeps::DataFeed like that: --- DataFeed.pm.org Thu Jul 14 14:15:31 2011 +++ DataFeed.pm Thu Jul 14 14:14:26 2011 @@ -59,7 +59,7 @@ Cwd::abs_path(File::Basename::dirname($inc{$_})), File::Basename::basename($inc{$_}), ), - } keys(%inc) + } grep defined $inc{$_},keys(%inc) ); print FH "\n);\n"; P.S. Sorry for my bad English (((
On 2011-07-14 10:22:29, zloyrusskiy wrote: Show quoted text
> P.S. Sorry for my bad English (((
No problem - thanks for the analysis. Your problem has been fixed in a slightly different form in Module::ScanDeps 1.03.