in reply to Re^2: Howto include Module with Specific Methods with PAR's pp utility
in thread Howto include Module with Specific Methods with PAR's pp utility

what circumstances -M option should/can be used

Sometimes pp fails to pull in a module if the script does not explicitly use that module. Not sure of the details, but it can happen - and if that does happen, then you can use the -M option to load the module. So ... I guess you're wondering what to do when when the module that pp fails to pull in needs to also export some functions.

I don't think pp's -M switch can handle that - though I could be wrong. I certainly didn't manage to find an incantation that works.

You can, however, work around the problem by rewriting the perl script so that it explicitly loads the module and exports the desired functions. That way there will be no need to load the module using the -M switch.

Cheers,
Rob
  • Comment on Re^3: Howto include Module with Specific Methods with PAR's pp utility

Replies are listed 'Best First'.
Re^4: Howto include Module with Specific Methods with PAR's pp utility
by Anonymous Monk on Oct 29, 2006 at 02:35 UTC
    I don't think pp's -M switch can handle that - though I could be wrong. I certainly didn't manage to find an incantation that works.

    perl is not pp, and -M doesn't serve the same purpose.