Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
PARoblems (problems with PAR)by Dr. Mu (Hermit) |
on Feb 25, 2005 at 07:25 UTC ( [id://434398]=perlquestion: print w/replies, xml ) | Need Help?? |
Dr. Mu has asked for the wisdom of the Perl Monks concerning the following question:
I'm just now dipping my toes into PAR. I can't say it's been pleasant, but I'm determined to make it work. Problem #1: I have my own library of modules that I specify with a use lib. (This library exists on a networked drive.) These modules refer to other modules in the standard Perl library. Running the program via perl.exe works fine. But when I try to run the exe that pp creates, I get errors in the use and require statements that refer back to the standard modules, viz: There's no mention of /perl/site/lib in @INC at this point. Problem(s) # 2: I almost hesitate to mention this, as it's so off the wall. Sometimes pp errors out with: Oddly enough, all I have to do is run it again once or twice more, and I won't get the error. But here's the really nutty part: the exe files it generates exhibit the same non-determinism. About 75% of the time when I execute one, it doesn't do anything -- just returns to the command line. The other 25% it will run just fine. I can endure a lot of grief, but this one will aggravate my customers, and that's bad. So, weird stuff. Any ideas? Update: I finally got the program to run by copying all the files to the XP host machine, deleting the use lib pragma from all but the main program, and adding some requires to the main program for Tk stuff. Setting the PAR_CLEAN environment variable didn't help with the non-deterministic stuff, I'm sorry to say. But now, when I transport the exe back to a Win98 machine and try to run it, I get a page fault in EVENT.DLL. This occurs even when I include perl58.dll in the exe file's directory. (The Win98 machine has a perl 5.6 installation.) I hate to say it, but I'm about ready to bag PAR and spend another chunk of change on a new perl2exe license. At least I know it works... Update 2: I retitled the node, adding the parentheticals, in accordance with a suggestion by jdporter. This will make it possible to search using the keyword "PAR". Update 3: Went back to perl2exe. It's not as good as PAR at rooting out dependencies, so I had to add some more requires. But, other than that, it works out of the box -- as do its executables. I haven't totally given up on PAR, but this isn't a hobby, and I don't have the time to fuss with it just now.
Back to
Seekers of Perl Wisdom
|
|