Thanks for your post. I'll give the cava packager a try.

But fortunately I found a solution to this pp challenge myself.

  1. Create par consisting of main_script and its helper scripts with all their dependencies:

    pp -p -o perl_app.par main_script.pl helper_script1.pl helper_script2.pl
  2. Open perl_app.par with an archive program and add to the /script folder a main.pl file.

    main.pl:

    if (defined $ENV{PAR_APP_REUSE}) { warn "Executable was created without the --reusable option. See 'p +erldoc pp'.\n"; exit(1); } my $zip = $PAR::LibCache{$ENV{PAR_PROGNAME}} || Archive::Zip->new(__FI +LE__); my $member = eval { $zip->memberNamed('script/main_script.pl') } or die qq(main.pl: Can't open perl script "script/main_script. +pl": No such file or directory ($zip)); PAR::_run_member($member, 1);
  3. Create perl_app.exe as follows:

    pp -o perl_app.exe perl_app.par

In the main_script you can then call the helper_scripts as follows (example with helper_script1.pl):

my $cmd; if ( defined $ENV{PAR_TEMP} ) { $cmd = "perl $ENV{PAR_TEMP}/inc/script/helper_script1.pl"; } else { $cmd = "perl helper_script1.pl"; } # execute cmd

In reply to Re^2: pp and multiple perl scripts by Dirk80
in thread pp and multiple perl scripts by Dirk80

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.