Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 23, 2004, 3:22 pm
rate this thread
Re: pp --addfile query
>The documentation for pp suggests you can add a file in as well as the
>script with --addfile=filename
>Can the script read this file? How would it open it?
>This would be super for bundling both an application and the steering
>file which defines how it operates.
To pack "somedir/steering.dat" into the "config/" zip dir inside the
pp -a somedir/steering.dat;config/steering.dat -o prog.exe prog.pl
Inside prog.pl, read it with:
my $contents = PAR::read_file("config/steering.dat");
The -a syntax above is "-a <original_filename>;<filename_in_zip>"
The function PAR::read_file is in PAR.pm which is already loaded, no
"use PAR.pm;" needed.
- » perk 5.8.5 forking causes userland crash on FreeBSD
- — Previous thread in » PERL Discussions