|There's more than one way to do things|
Re: Very Odd Issue When Using pp to Create an .exe File Including Date::Calcby swl (Vicar)
|on Jun 28, 2017 at 04:04 UTC||Need Help??|
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:
and shortening the code somewhat:
And then running it through scandeps.bat (in this case the code is in use_on_one_line_42_at_end.pl).
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:
But on further checking, it is triggered for any value >= 5.01
These list Date::Calc and Date::Calc::PP
This does not:scandeps -e"use 5.01; use Date::Calc"
And for general reference:
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.