Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: PAR packaging

by tsee (Curate)
on Jun 21, 2006 at 09:49 UTC ( #556613=note: print w/replies, xml ) Need Help??

in reply to PAR packaging


I have constructed a simple test which does what you want but does not reproduce your problem:

Put this in

#!/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

package MyModule; print "foo"; 1;

Now run this command:

PERL5LIB=lib pp -o t.par -p -v -M MyModule


  • If you just execute before running the pp command, 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 (That's the PERL5LIB=... part.)
  • It puts into the t.par archive.
  • Subsequent execution of will use t.par as a PAR archive and load 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 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,

Replies are listed 'Best First'.
Re^2: PAR packaging
by rootcho (Pilgrim) on Jun 21, 2006 at 23:05 UTC
    ok...thank you very much, will try your suggestions and will post the results..
Re^2: PAR packaging
by rootcho (Pilgrim) on Jun 23, 2006 at 23:16 UTC
    hmm, now after i read more carefully what u wrote.. i don't want to do exacactly what u specify
    I want and to be outside of the .PAR so that i can change them often. And i want to use the .PAR for all of the CPAN modules we use.
    'Cause we don't own the boxes were the scripts will be, it will be alot easier for use to deploy the scripts if common CPAN modules can be in a .par.
    Now on the script...just for this reason I first use :
    use FindBin qw($Bin); use lib $Bin . "lib"; use MyModule;
    and then :
    use PAR '/path/to/test.par';
    So that the script can find the module, outside the .par.
    But as I already said when I execute the script outside the .par, I'm getting this 100%-cpu usage on stat64() call.
    OK, i contunued my investigation to see exactly which is this module, after I checked the cache the file is the HTML::HeadParser module.
    Now the more interesting part ;) If i go into the .par, delete this module from archive and start runs w/o a problem

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://556613]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2018-02-21 20:05 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (287 votes). Check out past polls.