view release on metacpan or search on metacpan
lib/Catalyst/Helper/InitScript/FreeBSD.pm view on Meta::CPAN
# parse args
{
no warnings 'uninitialized';
my $opts = {};
local @ARGV = @args;
my $ret = GetOptions(
'help|?' => \$opts->{help},
'user=s' => \$opts->{user},
'group=s' => \$opts->{group},
'pidfile|p=s' => \$opts->{pidfile},
view all matches for this distribution
view release on metacpan or search on metacpan
t/aggregate/unit_core_script_cgi.t view on Meta::CPAN
use Test::More;
use Test::Fatal;
use Catalyst::Script::CGI;
local @ARGV;
is exception {
Catalyst::Script::CGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
}, undef, "new_with_options";
shift @TestAppToTestScripts::RUN_ARGS;
my $server = pop @TestAppToTestScripts::RUN_ARGS;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/TestApp/Controller/Root.pm view on Meta::CPAN
:MenuPath('/How it works/The template')
:MenuTitle('The template')
{
my ( $self, $c ) = @_;
my $text;
{ local (@ARGV, $/) = 'TestApp/root/src/index.tt2'; $text = <> }
$c->res->content_type('text/plain');
$c->res->body($text);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/MockHTTPClient.pm view on Meta::CPAN
use Moo;
sub get {
my ($self, $url) = @_;
$url =~ /query=([^&]+)/;
my $xml = do {local (@ARGV, $/) = "t/$1"; <>};
{success => 1, status => 200, reason => 'OK', content => $xml,};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/MockHTTPClient.pm view on Meta::CPAN
use Moo;
sub get {
my ($self, $url) = @_;
$url =~ /query=([^&]+)/;
my $xml = do {local (@ARGV, $/) = "t/files/$1"; <>};
{success => 1, status => 200, reason => 'OK', content => $xml,};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/RDF.pm view on Meta::CPAN
has sparql => (
is => 'ro',
lazy => 1,
trigger => sub {
my ($sparql, $ns) = ($_[1], $_[0]->ns);
$sparql = do { local (@ARGV,$/) = $sparql; <> } if $sparql =~ /^\S+$/ && -r $sparql;
my %prefix;
# guess requires prefixes (don't override existing). Don't mind false positives
$prefix{$_} = 1 for ($sparql =~ /\s([a-z][a-z0-0_-]*):/mig);
delete $prefix{$_} for ($sparql =~ /PREFIX\s+([^:]+):/mg);
$_[0]->{sparql} = join "\n", (map { $ns->SPARQL($_) } keys %prefix), $sparql;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/MockHTTPClient.pm view on Meta::CPAN
use Moo;
sub get {
my ($self, $url) = @_;
$url =~ /query=([^&]+)/;
my $xml = do {local (@ARGV, $/) = "t/files/$1"; <>};
{success => 1, status => 200, reason => 'OK', content => $xml,};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/exporter.t view on Meta::CPAN
{ _id => 'foo', _xml => [ foo => {} ] },
{ _id => 'bar.xml', _xml => [ bar => {} ] },
]);
ok(-e "$dir/foo.xml" and -e "$dir/bar.xml", 'export to directory');
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo/>\n";
$out = do { local (@ARGV, $/) = "$dir/foo.xml"; <> };
is $out, $xml, 'exported to multiple files';
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cinnamon/CLI.pm view on Meta::CPAN
}
sub run {
my ($self, @args) = @_;
local @ARGV = @args;
my $p = Getopt::Long::Parser->new(
config => ["no_ignore_case", "pass_through"],
);
$p->getoptions(
"h|help" => \$self->{help},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/AutoDB/ppport.h view on Meta::CPAN
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
lib/Class/AutoDB/ppport.h view on Meta::CPAN
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Scaffold/App/Test/YAMLDriven.pm view on Meta::CPAN
$testdir
);
for my $name (sort keys %file) {
note "Loading test file $name";
( my $tests_yaml =
do { local (@ARGV, $/) = $file{$name}; <> }
) =~ s/%%PID%%/sprintf("%06d", $$)/ge;
$tests_yaml =~ s/%%CNT%%/sprintf("%03d", ++(our $cnt))/ge;
# Quick regex check whether the test wants to be skipped. To use
# Load() on a test that wants to be skipped would be a bad idea as it
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Sniff/App.pm view on Meta::CPAN
=cut
sub new {
my ( $class, @args ) = @_;
local @ARGV = @args;
my $self = bless {
dirs => undef,
ignore => undef,
namespace => qr/./,
output => undef,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Usul/TraitFor/UntaintedGetopts.pm view on Meta::CPAN
my $usage_opt = $config{usage_opt} ? $config{usage_opt} : 'Usage: %c %o';
@gld_conf{ @gld_attr } = @config{ @gld_attr };
$config{usage_conf } and $_set_usage_conf->( $config{usage_conf} );
$config{protect_argv } and local @ARGV = @ARGV;
$enc and @ARGV = map { decode( $enc, $_ ) } @ARGV;
$config{no_untaint } or @ARGV = map { untaint_cmdline $_ } @ARGV;
$Untainted_Argv = [ @ARGV ];
keys %{ $splitters } and @ARGV = $_split_args->( $splitters );
($opt, $Usage) = describe_options( $usage_opt, @options, \%gld_conf );
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
Cwd::chdir($iwd) || warn "$iwd: $!\n";
my($cli) = grep /^viewenv=/, @ARGV;
$venv = (split /=/, $cli)[1] if $cli;
$venv ||= '.viewenv.pl';
if (-f $venv) {
local @ARGV = grep /^\w+=/, @ARGV;
push(@ARGV, @viewenv_argv) if @viewenv_argv;
print "+ reading $venv ...\n";
eval { require $venv };
warn Msg('W', $@) if $@;
}
view all matches for this distribution
view release on metacpan or search on metacpan
use File::Find;
($EQHL, $PRHL, $STHL, $FCHL) = qw(EqInc PrevInc StBr FullCpy);
# Note: only wrapper supported functionality--possible fallback to cleartool
sub _Wrap {
local @ARGV = @_;
ClearCase::Wrapper::Extension($ARGV[0]);
no strict 'refs';
my $rc = eval { "ClearCase::Wrapper::$ARGV[0]"->(@ARGV) };
if ($@) {
chomp $@; #One extra newline to avoid dumping the stack
view all matches for this distribution
view release on metacpan or search on metacpan
# Examines supplied arg vector, returns the explicit or implicit working view.
sub ViewTag {
my $vtag;
if (@_) {
local(@ARGV) = @_;
GetOptions("tag=s" => \$vtag);
}
if (!$vtag) {
require Cwd;
my $cwd = Cwd::fastgetcwd;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv || 0;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
buildlib/Clownfish/Build.pm view on Meta::CPAN
# the generated Makefile.
my $error = system("$^X -Mblib -MClownfish::Test -e1");
if ($error) {
print STDERR "Build succeeded, but 'use Clownfish::Test' failed.\n";
if ($ENV{AUTOMATED_TESTING}) {
my $makefile = do { local(@ARGV, $/) = 'Makefile'; <> };
print STDERR "\nContents of Makefile:\n$makefile";
}
die;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/clustericious_app.t view on Meta::CPAN
$t->get_ok('/autotest_not_found')
->status_is(404);
note $t->tx->res->text;
my($out,$err,$ret) = capture {
local @ARGV = 'routes';
local $ENV{MOJO_APP} = 'SomeService';
Clustericious::Commands->start;
};
note "[routes]\n$out" if $out;
note "[err]\n$err" if $err;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use_ppport '3.19';
cc_append_to_libs '-lobjc';
my $use_local_framework;
if ($use_local_framework = (grep(/USE_LOCAL_GROWL_FRAMEWORK=.*/, @ARGV))[0] ) {
$use_local_framework =~ s/.*?=//;
}
@ARGV = grep !/USE_LOCAL_GROWL_FRAMEWORK/, @ARGV;
if ($use_local_framework) {
view all matches for this distribution