http://qs1969.pair.com?node_id=845770


in reply to How PAR pp works?

Newer versions of Switch.pm (as they come with 5.12.x) have a line

use if $] >= 5.011, 'deprecate';

which - due to the use if - apparently isn't considered a dependency of Switch by Module::ScanDeps (which is used under the hood by PAR).

Try explicitly adding the module (pp -M deprecate ..., I think). — Or better yet, don't use Switch in the first place... :)

Replies are listed 'Best First'.
Re^2: How PAR pp works?
by saintex (Scribe) on Jun 21, 2010 at 19:52 UTC
    I have also turned the switch in if, elsif, else, solving that problem...
    But the problem is not the switch but is how the modules are boundled in...
    because I have the same problem with NET::SMTP and similar...
    I will read the document below from Anonymous Monk, and then I will get back here...
      But the problem is not the switch but is how the modules are boundled in...

      Well, the thing is that on some occassions, Module::ScanDeps fails to detect dependencies.  Usually, the problem is with shared object files that XS modules have been linked against, but there are also other difficult cases like the one above you found with Switch.

      In that case, you just have to help pp by telling it (using the options -M, -l, -a) what else to include in the package (.pm / .so files, etc.) in addition to what Module::ScanDeps automatically figured out.  In case of doubt, try to deploy the package in an environment comparable to the target environment (i.e. without Perl/modules/libs installed) until it no longer complains about missing stuff...

        In case of doubt, try to deploy the package in an environment comparable to the target environment (i.e. without Perl/modules/libs installed) until it no longer complains about missing stuff...

        That can be as simple as starting a new console and emptying %PATH%