# par_wrap.pl # This file is a merging of the stub scripts in PAR::Packer # in the subs _main_pl_multi and _main_pl_single # It defaults to running main.pl but if the first arg ends in .pl # then we look for another script to run my $file = 'main.pl'; $file = shift if $ARGV[0] =~ /\.pl$/; my $zip = $PAR::LibCache{$ENV{PAR_PROGNAME}} || Archive::Zip->new(__FILE__); my $member = eval { $zip->memberNamed($file) || $zip->memberNamed("$file.pl") || $zip->memberNamed("bin/$file") || $zip->memberNamed("bin/$file.pl") || $zip->memberNamed("script/$file") || $zip->memberNamed("script/$file.pl") } or die qq(Can't open perl script "$file": No such file or directory); PAR::_run_member($member, 1); __END__