Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, I am currently facing a problem with Par Packer where when I try to package my script it will give me the error saying: Can't Locate Loadable object for module Time::Hires; If I create a simple file with use Time::Hires and print the localtime in a string it works. However if I add more modules and code to the same file, it doesn't find the Time::Hires module. I looked in the directory where it caches the files and the module is present but looks like it can't be found. Any help is appreciated. I will provide more info if you need it. I am using the latest Active Perl (32 bit) on Windows 7 and running the executable on Windows 2003. -Latest Par Packer as well.
  • Comment on Par Packer can't locate loadable module

Replies are listed 'Best First'.
Re: Par Packer can't locate loadable module
by Anonymous Monk on Mar 06, 2013 at 18:32 UTC
      Thanks for the reply. I used: pp -l <libssh2.dll> -o abc.exe abc.pl I have tried the -X switch in the following command: pp -l <libssh2.dll> -X Time::Hires -o abc.exe abc.pl and it works. Can you please explain what the X switch does. I read that it excludes it dependency search path and uses it at runtime but how is it any different from it being part of the package.

        Ack, I did it again!

        I actually meant to say -x not -X

        -X is considered (by me) "advanced usage", like if you're trying to cut down on file-sizes , so you create a CORE.par and DBI.par, and then

        when creating foo.exe/bar.exe/baz.exe , each loads CORE.par/DBI.par without including it inside of foo.exe bar.exe

        So you can update CORE.par and DBI.par without updating foo.exe, but if DBI.par is missing, foo.exe breaks

        An alternative to pp/PAR is http://www.cavapackager.com/appdocs/contents.htm