---------- Forwarded message ----------
From: Ron W <ronw.m...@gmail.com>
Date: Tue, Dec 16, 2014 at 10:39 AM
Subject: Re: Problem with cache files being deleted
To: Shawn Laffan <shawn.laf...@unsw.edu.au>

On Tue, Dec 16, 2014 at 6:16 AM, Shawn Laffan <shawn.laf...@unsw.edu.au>
wrote:
>
> What I'm thinking of is some way for a PAR executable to detect if extra
> files packed using -a are missing, and then unpack them.
>

I just had a thought for a work-around.

When pp script.pl is run, the script is "statically scanned" for
dependencies.

When pp -c script.pl is run, after the static scan, the script is compiled
(like perl -c script.pl). I am thinking that %INC is then inspected for
additional libraries.

So, my idea is, after identifying all the extra files to be included with
-a, go back to the main .pl file and add a BEGIN block that adds those
library names to %INC. Then run "pp -c main.pl" - without any -a options -
then verify the created executable runs correctly.

As I said, I see this as a work-around.

A better solution would be for pp to save the names of all the files
included via -a just as it saves the ones it detects.

Reply via email to