Peter Gordon wrote:
Hi.
I am using pp to pack a perl application. It happens to be a wxPerl
project and in the example below I have left out all the includes.
I need to read a a file app.xrc from my application. I have used the -a
flag.
The manual says "By default, files are placed under "/" inside the
package with their original names.". When I tried to see if the file
exists with -e, it fails.
I tried thusly:
pp -a z:/Utils/Diagnostics/app.xrc -o app_diag.exe app_diag.pl
and thusly:
pp -a z:/Utils/Diagnostics/app.xrc;/app.xrc -o app_diag.exe
app_diag.pl
Can someone please tell me how to access the file app.xrc from my
application.
Thanks,
Peter
This is one way to do it:
pp -a "c:/some/full/path/text;/path/in/the/par/text" -o hello.exe
hello.pl
and then use:
$text = PAR::read_file("/path/in/the/par/text");
You would access the app.xrc file internal to your application code like
this:
my $text = PAR::read_file("/path/in/the/par/text");
which would translate to
my $text = PAR::read_file("/Utils/Diagnostics/app.xrc");