2009/4/20 Octavian Râşniţă <[email protected]>:
> I created the .par archive of that Catalyst app using:
>
> perl Makefile.PL
> nmake
> nmake test
> nmake catalyst_par
OK, you probably started off developing your app by running
catalyst.pl
right? That created a skeleton file tree including the Makefile.PL above.
If you run "perl Makefile.PL" this generates a stanza:
catalyst_par :: all
$(NOECHO) $(PERL) -Ilib \
-Minc::Module::Install -MModule::Install::Catalyst \
-e"Catalyst::Module::Install::_catalyst_par('', 'Foo-Bar',
{ CLASSES => [], CORE => 0, ENGINE => 'CGI',
MULTIARCH => 0, SCRIPT => '', USAGE => q## } )"
Hence "make catalyst_par" eventually invokes
Catalyst::Module::Install::_catalyst_par
(which is from Module::Install::Catalyst) which generates the .par by calling
App::Packer::PAR. The problem is the parameter CORE => 0.
This tells PAR _not_ to pack any Perl core modules into the .par file.
Now for Perl 5.10, mro.pm _is_ a core module. So your .par file is not
fully self contained and won't run under parl.exe on a machine that
doesn't have perl (5.10) installed.
To fix add "catalyst_par_core(1)" to Makefile.PL _before_
the call to catalyst() and re-run "perl Makefile.PL". This should
change CORE => 0 to CORE => 1in the generated Makefile
and result in a .par containing (amon other stuff) mro.pm.
...
requires 'Catalyst::Runtime' => '5.71001';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::Action::RenderView';
requires 'parent';
requires 'Config::General';
catalyst_par_core(1); <====
catalyst;
install_script glob('script/*.pl');
...
Cheers, Roderich