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
# Read in code tables
my $tabled = read_table_d("$bufrlib/TABLED");
my $tableb = read_table_b("$bufrlib/TABLEB");
$self->{BUFRTEXT} = do { local( @ARGV, $/ ) = $file; <> } ; # slurp!
#
## Pull out the separate BUFR sections and lengths
#
my $ptr = CORE::index($self->{BUFRTEXT}, 'BUFR'); # Find start of BUFR file
my $name = shift;
my $file = shift;
# magical slurp of data from $file
my $text = do { local( @ARGV, $/ ) = $file ; <> } ;
my ($desc) = ($text =~ m|\[$name\]\s*\d+ ([\d{6}\s*]+)|s);
my @desc = split " ", $desc;
# descriptors are 6 digits of the form FXXYYY.
view all matches for this distribution
view release on metacpan or search on metacpan
print " --- hint for $func ---\n", $hint;
}
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); <> };
$self =~ s/^$HS+Do NOT edit.*?(?=^-)//ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
view all matches for this distribution
view release on metacpan or search on metacpan
print " --- hint for $func ---\n", $hint;
}
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); <> };
$self =~ s/^$HS+Do NOT edit.*?(?=^-)//ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
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
print " --- hint for $func ---\n", $hint;
}
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;
view all matches for this distribution
view release on metacpan or search on metacpan
script/rt-mailgate view on Meta::CPAN
= eval { tempfile( DIR => tempdir( CLEANUP => 1 ) ) };
if ( !$fh || $@ ) {
print STDERR "$0: Couldn't create temp file, using memory\n";
print STDERR "error: $@\n" if $@;
my $message = \do { local ( @ARGV, $/ ); <STDIN> };
unless ( $$message =~ /\S/ ) {
print STDERR "$0: no message passed on STDIN\n";
$self->exit_with_success;
}
$$message = $opts->{'headers'} . $$message if $opts->{'headers'};
view all matches for this distribution
view release on metacpan or search on metacpan
bin/rt-repeat-ticket.in view on Meta::CPAN
return;
}
sub process_args {
require Getopt::Long;
local @ARGV = @_;
my %opt;
Getopt::Long::GetOptions( \%opt, 'help|h', 'date=s', 'type=s', 'ticket=s' );
if ( delete $opt{help} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RapidApp/Helper/Traits/RapidDbic.pm view on Meta::CPAN
'DBIC::Schema::ForRapidDbic' => $schema_class,
@loader_opts, @connect_info, @connect_opts
);
{
local @ARGV = @args;
# This is ugly but is the cleanest way to pass in extra configs without mucking with
# the complex arg call structure of the public/legacy API (of Model::DBIC::Schema)
local $RapidApp::Helper::Traits::RapidDbic::_ra_rapiddbic_opts = $opts;
print join("\n",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Redis/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/Redis/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
redland/rasqal/tests/rdql/testsuite/check-rdql view on Meta::CPAN
# Argument handling
my $usage=0;
while(@ARGV && $ARGV[0] =~ /^-(.+)$/) {
local $_=shift(@ARGV);
if(/^-d/) {
$debug=1;
} elsif (/^-s$/) {
if(!@ARGV) {
$usage=1;
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
print " --- hint for $func ---\n", $hint;
}
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;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Regexp/Debugger.pm view on Meta::CPAN
my $FROM_START = 0;
sub rxrx {
# Handle: rxrx <filename>
if (@_) {
local @ARGV = @_;
# If file is a debugger dump, decode and step through it...
my $filetext = do { local $/; <> };
my $dumped_data = eval { $JSON_decoder->($filetext) };
if (ref($dumped_data) eq 'HASH' && defined $dumped_data->{regex_ID} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
print " --- hint for $func ---\n", $hint;
}
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;
view all matches for this distribution
view release on metacpan or search on metacpan
sub run_sudoku ($file) {
#
# First, slurp in the file
#
my $test = do {local (@ARGV, $/) = ($file); <>};
my @chunks = split /\n==\n/ => $test;
#
# First one is always the sudoku.
#
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
t/Renard/Curie/App.t view on Meta::CPAN
} catch {
plan skip_all => "$_";
};
my $c = CurieTestHelper->get_app_container;
my $app = $c->app;
local @ARGV = ($pdf_ref_path);
$app->process_arguments;
like $c->main_window->window->get_title, qr/\Q$pdf_ref_path\E/, "Window title contains path to file";
undef $app;
};
subtest "Process no arguments" => sub {
my $app = CurieTestHelper->get_app_container->app;
local @ARGV = ();
lives_ok {
$app->process_arguments;
} 'Processes no arguments fine';
undef $app;
};
subtest "Process arguments for non-existent file" => sub {
my $non_existent_filename = File::Temp::tmpnam();
local @ARGV = ($non_existent_filename);
my $app = CurieTestHelper->get_app_container->app;
throws_ok {
$app->process_arguments;
} 'Renard::Incunabula::Common::Error::IO::FileNotFound', "Throws exception when file not found";
undef $app;
};
subtest "Process --help flag" => sub {
my $app = CurieTestHelper->get_app_container->app;
local @ARGV = qw(--help);
trap { $app->process_arguments; };
like( $trap->stdout, qr/--help/, 'Shows usage text' );
is( $trap->exit, 0, 'Exits successfully after call' );
undef $app;
};
subtest "Process --version flag" => sub {
my $app = CurieTestHelper->get_app_container->app;
local @ARGV = qw(--version);
trap { $app->process_arguments; };
like( $trap->stdout, qr/Project Renard Curie/, 'Prints full name of application' );
is( $trap->exit, 0, 'Exits successfully after call' );
undef $app;
};
subtest "Process --short-version flag" => sub {
my $app = CurieTestHelper->get_app_container->app;
local @ARGV = qw(--short-version);
trap { $app->process_arguments; };
chomp( my $version_or_dev = $trap->stdout );
note "Got version: $version_or_dev";
if( $version_or_dev =~ qr/^dev$/ ) {
pass( 'Prints out dev as version' );
view all matches for this distribution
view release on metacpan or search on metacpan
xt/cover.pl view on Meta::CPAN
chdir '..' or die "$!";
};
do "./Build.PL";
local @ARGV = (@ARGV, 'testcover');
do "./Build";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Respite/Server/Test.pm view on Meta::CPAN
# start the server in a child, block the parent until ready
my $pid = fork;
die "Could not fork during test\n" if ! defined $pid;
if (!$pid) { # child
local @ARGV;
$server->run_server(setsid => 0, background => 0); # allow a kill term to close the server too
exit;
}
$client->{'_test_ender'} = end {
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/Rex/Apache/Build.pm view on Meta::CPAN
. ". Using current time." );
return "" . time;
}
my ($version) =
grep { $_ = $1 if $_ =~ $regex; } eval { local (@ARGV) = ($file); <>; };
return $version;
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rex/Bundle.pm view on Meta::CPAN
my $meta_file = "META.yml";
if(-f "MYMETA.yml") { $meta_file = "MYMETA.yml"; }
if(-f $meta_file) {
my $yaml = eval { local(@ARGV, $/) = ($meta_file); $_=<>; $_; };
eval {
my $struct = Load($yaml);
push(@ret, $struct->{'configure_requires'});
push(@ret, $struct->{'build_requires'});
push(@ret, $struct->{'requires'});
lib/Rex/Bundle.pm view on Meta::CPAN
if(!$found) {
if(-f "Makefile.PL") {
no strict;
no warnings 'all';
my $makefile = eval { local(@ARGV, $/) = ("Makefile.PL"); <>; };
my ($hash_string) = ($makefile =~ m/WriteMakefile\((.*?)\);/ms);
my $make_hash = eval "{$hash_string}";
if(exists $make_hash->{"PREREQ_PM"}) {
push @ret, $make_hash->{"PREREQ_PM"};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rex/CMDB/TOML.pm view on Meta::CPAN
for my $file (@files) {
Rex::Logger::debug("CMDB - Opening $file");
if ( -f $file ) {
my $content = eval { local ( @ARGV, $/ ) = ($file); <>; };
my $t = Rex::Config->get_template_function();
$content .= "\n"; # for safety
$content = $t->( $content, \%template_vars );
my ( $ref, $parse_error ) = from_toml($content);
lib/Rex/CMDB/TOML.pm view on Meta::CPAN
Rex::Logger::debug( "CMDB - Processing role '" . $role . "'" );
my $role_file = File::Spec->join( $self->{roles_path}, $role . '.toml' );
# if the file exists, load it
if ( -f $role_file ) {
my $content = eval { local ( @ARGV, $/ ) = ($role_file); <>; };
my $t = Rex::Config->get_template_function();
$content .= "\n"; # for safety
$content = $t->( $content, \%template_vars );
my ( $ref, $parse_error ) = from_toml($content);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rex/CMDB/YAMLwithRoles.pm view on Meta::CPAN
for my $file (@files) {
Rex::Logger::debug("CMDB - Opening $file");
if ( -f $file ) {
my $content = eval { local ( @ARGV, $/ ) = ($file); <>; };
my $t = Rex::Config->get_template_function();
$content .= "\n"; # for safety
$content = $t->( $content, \%template_vars );
my $ref;
lib/Rex/CMDB/YAMLwithRoles.pm view on Meta::CPAN
my $role_file = File::Spec->join( $self->{roles_path}, $role . '.yaml' );
# if the file exists, load it
if ( -f $role_file ) {
my $content = eval { local ( @ARGV, $/ ) = ($role_file); <>; };
my $t = Rex::Config->get_template_function();
$content .= "\n"; # for safety
$content = $t->( $content, \%template_vars );
my $ref;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rex/Endpoint/HTTP/Interface/Fs/Base.pm view on Meta::CPAN
if(! -f $path) {
die("File not found.");
}
my $content = eval { local(@ARGV, $/) = ($path); <>; };
return $content;
}
sub ln {
view all matches for this distribution