pp uses Module::ScanDeps to find dependencies, and it looks like it is not properly parsing lines containing /use\s+\d/

Using the current version of Module::ScanDeps:

perl -MModule::ScanDeps -e"print $Module::ScanDeps::VERSION" 1.23

and shortening the code somewhat:

use utf8; use strict; use List::Util qw(max); use Date::Calc qw(Delta_ +Days); use 42;

And then running it through scandeps.bat (in this case the code is in use_on_one_line_42_at_end.pl).

scandeps use_on_one_line_42_at_end.pl 'Portable' => '1.22', 'File::Which' => '1.21', 'CryptX' => '0.044', 'Portable::CPAN' => '1.22', 'Portable::Config' => '1.22', 'Portable::HomeDir' => '1.22', 'Portable::LoadYaml' => '1.22', 'Portable::minicpan' => '1.22', 'Portable::FileSpec' => '1.22', 'File::HomeDir' => '1.00', 'File::HomeDir::Darwin::Carbon' => '1.00', 'File::HomeDir::Darwin::Cocoa' => '1.00', 'File::HomeDir::FreeDesktop' => '1.00', 'File::HomeDir::MacOS9' => '1.00', 'File::HomeDir::Test' => '1.00', 'File::HomeDir::Windows' => '1.00', 'File::HomeDir::Unix' => '1.00', 'File::HomeDir::Darwin' => '1.00', 'File::HomeDir::Driver' => '1.00', 'Math::BigInt::GMP' => '1.6003', 'Math::BigInt::LTM' => '0.044',

The above also does not list List::Util, but that can be done using the -B flag in the scandeps.pl call

In fact, the issue also manifests in one-liners as these two are also missing Date::Calc in their outputs:

scandeps -e"use 5.022; use Date::Calc" scandeps -e"use Date::Calc; use 5.022"

But on further checking, it is triggered for any value >= 5.01

These list Date::Calc and Date::Calc::PP

scandeps -e"use 5.009; use Date::Calc" scandeps -e"use 4; use Date::Calc"

This does not:

scandeps -e"use 5.01; use Date::Calc"

And for general reference:

scandeps -e"use 5.009;" No modules found!

It can also be reproduced using other modules. This one-liner does not list Text::CSV_XS.

scandeps -e"use 5.01; use Text::CSV_XS"

It is probably worth raising as a Module::ScanDeps issue.


In reply to Re: Very Odd Issue When Using pp to Create an .exe File Including Date::Calc by swl
in thread Very Odd Issue When Using pp to Create an .exe File Including Date::Calc by perldigious

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.