in reply to PAR packaging
Hi,
I have constructed a simple test which does what you want but does not reproduce your problem:
Put this in t.pl:
#!/usr/bin/perl use strict; use warnings; use lib '.'; use PAR qw/t.par/; use MyModule; print "\nbar\n";
And put this in the subdirectory lib in the file MyModule.pm
package MyModule; print "foo"; 1;
Now run this command:
PERL5LIB=lib pp -o t.par -p -v t.pl -M MyModule
Explanation:
- If you just execute t.pl before running the pp command, MyModule.pm will not be found because it is in the lib/ subdirectory.
- If you run the pp command, it temporarily uses lib/ as a perl library directory so pp can find and package MyModule.pm. (That's the PERL5LIB=... part.)
- It puts MyModule.pm into the t.par archive.
- Subsequent execution of t.pl will use t.par as a PAR archive and load MyModule.pm from there.
Does this work for you? If not, please tell me what OS you are on, what version of PAR you are using and what version of perl you have. This was PAR 0.941, perl 5.8.7 on kubuntu/dapper/x86_64.
Finally a little explanation of your strace output. (I'm not an expert on strace, though.) The file 1ec196d6.pm is a filename-mangled version of one of the modules PAR uses internally. To find out which one it is, open it with an editor and look for the "package" declaration. Now, the fact that it is put into the 1/ subdirectory of the cwd() is most certainly a PAR bug. I will investigate that and appreciate any feedback.
Hope this helps,
Steffen
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: PAR packaging
by rootcho (Pilgrim) on Jun 21, 2006 at 23:05 UTC | |
Re^2: PAR packaging
by rootcho (Pilgrim) on Jun 23, 2006 at 23:16 UTC |