4 use base 'Class::Accessor::Fast';
13 Catalyst::PAR - Package Catalyst Applications
21 Package Catalyst Applications.
27 =item $self->package( $par, $engine )
32 my ( $self, $options ) = @_;
34 my $par = $options->{par} || 'application.par';
35 my $engine = $options->{engine} || 'CGI';
39 die "Please install PAR" if $@;
40 eval "use PAR::Packer ()";
41 die "Please install PAR::Packer" if $@;
42 eval "use App::Packer::PAR ()";
43 die "Please install App::Packer::PAR" if $@;
44 eval "use Module::ScanDeps ()";
45 die "Please install Module::ScanDeps" if $@;
47 chdir File::Spec->catdir( $FindBin::Bin, '..' );
49 # Find additional files
53 my $name = $File::Find::name;
54 return if $name =~ /^\W*lib/;
55 return if $name =~ /\.par$/;
56 return if $name !~ /\w+/;
63 my $par_test = File::Spec->catfile( $FindBin::Bin, '..', 'par_test.pl' );
66 my $class = $options->{class};
67 my $tmp_file = IO::File->new("> $par_test");
68 print $tmp_file <<"EOF";
69 BEGIN { \$ENV{CATALYST_ENGINE} = '$engine' };
77 my %opt = ( 'x' => 1, 'n' => 0, 'o' => $par, 'a' => [@files] );
78 App::Packer::PAR->new(
79 frontend => 'Module::ScanDeps',
80 backend => 'PAR::Packer',
83 args => ['par_test.pl'],
93 Sebastian Riedel, C<sri@oook.de>
97 This library is free software, you can redistribute it and/or modify it under
98 the same terms as Perl itself.