rmflow has asked for the wisdom of the Perl Monks concerning the following question:

I have 3 identical scripts: myscript, myscript.pl and myscript.plw

The problem is that par packer utility generates different results on those scripts:
pp myscript
pp myscript.pl
are OK, but
pp myscript.plw
generates wrong executable with much smaller size and this executable is not working. Is it possible to use par packer with different script file extensions?

Replies are listed 'Best First'.
Re: Par Packer and script extensions
by marto (Cardinal) on Mar 24, 2010 at 10:07 UTC

    Can you expand on "this executable is not working". Do you see any error messages displayed when you run it from the command prompt? Have you unpacked your executable to find out what has actually been packaged?

    Perhaps the .plw file extension is resulting in dependant modules being missed when pp is packing, which may explain the resulting executable with its smaller file size.

      the resultung executable does nothing when I try to run it and no error messages are displayed. I unpacked the executable and found no addition modules inside (only main.pl and myscript.plw), i.e. myscript.plw uses Tk, but no traces of Tk inside packed executable.

      If I rename myscript.plw to myscript.pl then pp myscript.pl does what I need and everything works fine.

      Perl info:
      This is perl, v5.10.0 built for MSWin32-x86-multi-thread

        Then some of your options are:

        • Debug the problem and find out why this is happening (perhaps something to do with how PAR/ Module::ScanDeps are used).
        • Try including modules explicitly when calling pp as described in the documentation.
        • Don't name your scripts with .plw extensions.
Re: Par Packer and script extensions
by Anonymous Monk on Mar 24, 2010 at 10:01 UTC
    pp doesnt care about file extensions