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+/;
62 my $par_test = File::Spec->catfile( $FindBin::Bin, '..', 'par_test.pl' );
65 my $class = $options->{class};
66 my $tmp_file = IO::File->new("> $par_test");
67 print $tmp_file <<"EOF";
68 BEGIN { \$ENV{CATALYST_ENGINE} = '$engine' };
76 my %opt = ( 'x' => 1, 'n' => 0, 'o' => $par, 'a' => [@files] );
77 App::Packer::PAR->new(
78 frontend => 'Module::ScanDeps',
79 backend => 'PAR::Packer',
82 args => ['par_test.pl'],
92 Sebastian Riedel, C<sri@oook.de>
96 This library is free software, you can redistribute it and/or modify it under
97 the same terms as Perl itself.