Hi,
I'm writing a Catalyst app which I must install on Windows (using
whichever is the latest ActivePerl, 5.12.1 I believe). I installed PAR
from ppm, but it is apparently missing parl. I am writing this app on
Linux and therefore the PAR gets bundled with XS binaries. What I want
to do (obviously) is override those with the site-specific libraries
on the target system.
It appears that I can tell PAR to prefer the system @INC by using
fallback and to ignore the binaries completely by setting
no_shlib_unpack. My problem is that I have no idea how to invoke perl -
MPAR (remember, no parl) such that those options are set and the
script inside gets run. I seem to be able to do one or the other:
C:\Users\dorian\Downloads>perl -MPAR testapp.par testapp_server.pl
Can't locate loadable object for module HTML::Parser in @INC (@INC
contains: CODE(0x3ef5320) C:\Users\dorian\AppData\Local\Temp\2\par-
dorian\cache-1e6b6d67c3df0911607f78ddebb81c34bc841f3c\inc\lib C:\Users
\dorian\AppData\Local\Temp\2\par-dorian
\cache-1e6b6d67c3df0911607f78ddebb81c34bc841f3c\inc\arch C:\Users
\dorian\AppData\Local\Temp\2\par-dorian
\cache-1e6b6d67c3df0911607f78ddebb81c34bc841f3c\inc CODE(0x1834df8)
CODE(0x1871920)) at C:/Perl64/site/lib/PAR/Heavy.pm line 103
Compilation failed in require at HTML/Entities.pm line 145.
Compilation failed in require at Catalyst/Engine.pm line 8.
BEGIN failed--compilation aborted at Catalyst/Engine.pm line 8.
Compilation failed in require at (eval 17) line 2.
...propagated at C:/Perl64/lib/base.pm line 94.
BEGIN failed--compilation aborted at Catalyst/Engine/CGI.pm line 4.
Compilation failed in require at (eval 16) line 2.
...propagated at C:/Perl64/lib/base.pm line 94.
BEGIN failed--compilation aborted at Catalyst/Engine/HTTP.pm line 4.
Compilation failed in require at ./script/testapp_server.pl line 9.
BEGIN failed--compilation aborted at ./script/testapp_server.pl line 10.
BEGIN failed--compilation aborted.
or conversely:
C:\Users\dorian\Downloads>perl -e "use PAR { file => 'testapp.par',
fallback => 1, run => 'testapp_server.pl' };"
Cannot run script 'testapp_server.pl' from PAR file 'testapp.par'.
Script couldn't be found in PAR file. at -e line 1
BEGIN failed--compilation aborted at -e line 1.
So I either need to be able to pass 'fallback' into the first sense or
figure out why the script doesn't resolve in the second. That or I am
missing something entirely and there is copious documentation covering
exactly what to do.
Thanks in advance,
--
Dorian Taylor
Make things. Make sense.
http://doriantaylor.com