[Catalyst] Catalyst + PAR + Module::Install::Catalyst
    Carl Franks 
    fireartist at gmail.com
       
    Tue Dec  6 11:46:58 CET 2005
    
    
  
See the PAR docs on available options.
As an example, below is a script I use to build an exe, rather than using `pp`.
You can of course ignore everything underneath the
# add Version no. to exe
Cheers,
Carl
#!C:\Perl\bin\perl.exe
use strict;
use warnings;
use PAR ();
use PAR::Packer ();
use Module::ScanDeps ();
use App::Packer::PAR ();
my %opt;
$opt{l} = [qw/
  c:\\usr\\perl\\site\\lib\\auto\\Wx\\wxbase26u_gcc_custom.dll
  c:\\usr\\perl\\site\\lib\\auto\\Wx\\wxmsw26u_adv_gcc_custom.dll
  c:\\usr\\perl\\site\\lib\\auto\\Wx\\wxmsw26u_core_gcc_custom.dll
/];
$opt{M} = [qw/
  File::Basename
  Wx::DND
  Wx::DocView
  Wx::FS
  Wx::Grid
  Wx::Help
  Wx::Html
  Wx::MDI
  Wx::Print
/];
$opt{I} = [qw/
  lib
/];
$opt{g} = 1; # --gui
$opt{C} = 1; # --clean
$opt{i} = 'build/mondrian.ico'; # --icon
$opt{o} = "build/Set Permissions.exe";
my $pl2exe = 'build/set_permissions.pl';
App::Packer::PAR->new(
    frontend    => 'Module::ScanDeps',
    backend     => 'PAR::Packer',
    frontopts   => \%opt,
    backopts    => \%opt,
    args        => [$pl2exe],
)->go;
# add Version no. to exe
use Win32::Exe;
my $exe     = Win32::Exe->new( $opt{o} );
my $rsrc    = $exe->resource_section;
my $version = $rsrc->first_object('Version');
my $try;
eval {
  push @INC, @{ $opt{I} };
  require CAMS::SetPerms::topFrame;
  if ($CAMS::SetPerms::topFrame::VERSION =~ /^(\d+)\.(\d)?(\d)?(\d)?$/) {
    my @points = ($1, $2, $3, $4);
    $_ ||= 0 for @points;
    $try = join( ',', @points );
  }
};
$try ||= '1,0,0,0';
$version->set( FileVersion => $try );
$version->set( CompanyName => 'x' );
$version->refresh;
$exe->write_file( $opt{o}, $exe->dump );
print "built .exe version $try\n";
    
    
More information about the Catalyst
mailing list