with pp options:
and the script-l libeay32_.dll -l zlib1_.dll -l ssleay32_.dll -a 'test.conf;script/test.conf' -M Mojolicious::Plugin::** -M Mojolicious::** -M Mojo::**
use Mojolicious::Lite; use File::Spec; BEGIN { if(exists $ENV{PAR_TEMP}) { my $dir = File::Spec->catfile($ENV{PAR_TEMP}, 'inc'); chdir $dir or die "chdir `$dir' failed: $!"; push @ARGV, qw( daemon -m production -l http://127.0.0.1:3000 ); } } my $file; if ( $ENV{PAR_TEMP} ) { print $ENV{PAR_TEMP}, "\n"; $file = $ENV{PAR_TEMP} . "/inc/script/test.conf"; } else { $file = 'test.conf'; } my $config = plugin 'Config' => { file => $file }; get '/test'; if(exists $ENV{PAR_TEMP} && $^O eq "MSWin32") { system qw(start http://localhost:3000/test); } app->start; __DATA__ @@ test.html.ep <!DOCTYPE html> <html> <head><title><%=config->{text}%></title></head> <body> <h1><%=config->{text}%></h1> </body> </html>
The packed archive works
frazapIn reply to Re^3: Mojolicious::Lite and PAR::Packer
by frazap
in thread Mojolicious::Lite and PAR::Packer
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |