Compiler-Parser
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/app/Plack/Runner.t view on Meta::CPAN
# delay the build process for reloader
sub build(&;$) {
my $block = shift;
my $app = shift || sub { };
return sub { $block->($app->()) };
}
sub parse_options {
my $self = shift;
local @ARGV = @_;
# From 'prove': Allow cuddling the paths with -I, -M and -e
@ARGV = map { /^(-[IMe])(.+)/ ? ($1,$2) : $_ } @ARGV;
my($host, $port, $socket, @listen);
require Getopt::Long;
my $parser = Getopt::Long::Parser->new(
config => [ "no_auto_abbrev", "no_ignore_case", "pass_through" ],
);
t/app/Plack/Util.t view on Meta::CPAN
$class . ".pm";
}
sub _load_sandbox {
my $_file = shift;
my $_package = $_file;
$_package =~ s/([^A-Za-z0-9_])/sprintf("_%2x", unpack("C", $1))/eg;
local $0 = $_file; # so FindBin etc. works
local @ARGV = (); # Some frameworks might try to parse @ARGV
return eval sprintf <<'END_EVAL', $_package;
package Plack::Sandbox::%s;
{
my $app = do $_file;
if ( !$app && ( my $error = $@ || $! )) { die $error; }
$app;
}
END_EVAL
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.187 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )