|Don't ask to ask, just ask|
Re: PAR Questionby crabbdean (Pilgrim)
|on Jul 18, 2004 at 11:37 UTC||Need Help??|
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.
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