Hi,

Is there some flag or environment variable that 'pp -c' will set when it
is compiling the program to check dependencies?  I need to load some
modules (which are normally loaded conditonally at runtime) at
compile-time during packaging so that their dependencies are picked up.

Here's the explanation for why I want this in case you have a better
solution:

I have a large program that I am packing with pp for distribution.  It
is seperated into two different modules, only one of which will be used
in a given run of the program.

The basic structure is this:

    if (some condition) {
        require First::Module;
        First::Module->run;
    } else {
        require Second::Module;
        Second::Module->run;
    }

If I put 'use First::Module; use Second::Module;' above this and use pp
-c, then all the modules they depend on are pulled in correctly.
However, if I remove those two 'use' statements there seem to be a large
number of modules missing from the PAR executable.

Since the two modules have a large number of dependencies, I would
rather only load the portion I need at runtime in order to save on
start-up time and memory use.  However, PAR doesn't seem to pick up
all the necessary modules when I do this.

Thank you for your help,
David Irving

Reply via email to