Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: PAR Question

by crabbdean (Pilgrim)
on Jul 18, 2004 at 11:37 UTC ( #375368=note: print w/ replies, xml ) Need Help??


in reply to PAR Question

Yes, I also had similar problems when attempting to do such a thing. For additional modules do:

pp -M this::module -M that::module -o out.exe foo.pl

... and I believe in reference to your last question you must include two things:
- a similar folder name of the my_script.pm (module or script) you want to import as it appears in your @INC using -I
- and also add the script using a full path name using -M.

pp -I \another\folder -M some::module -M c:\full\path\my_script.pm -o out.exe foo.pl

Note: I'm never done this way of -I although I believe its the solution and will be attempting on the next PAR I do

Also, I'm not sure if in writing the command in any particular order is important but I'd suggest doing -I before -M just in case.

Additionally, if you don't create the additional folder in the archive using -I it will drop your own my_script.pm that you imported using -M into the root of the PAR archive. Although this isn't probably the cleanest way to pack the archive, I found for my programs (EXE's) it still finds the my_script.pm because it must search this root folder of the archive for included modules/scripts.

Also, the PAR archive is really a zipped archive which can be viewed in Winzip. If you create the PAR file without using the -o flag like this:

pp -I \another\folder -M some::module -M c:\full\path\my_script.pm foo.pl

... and then open the resulting PAR file in winzip you'll get an idea of the structure and setup of the PAR archive. Hope that helps.


Dean
The Funkster of Mirth
Programming these days takes more than a lone avenger with a compiler. - sam
RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers


Comment on Re: PAR Question
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://375368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-11-24 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (135 votes), past polls