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
xs/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;
xs/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
lib/File/ppport.h view on Meta::CPAN
$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;
lib/File/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
# ########## #
# Parse ARGV #
# ########## #
use Encode::Locale;
use Encode;
@ARGV = map { decode(locale => $_, 1) } @ARGV;
my %args = ();
my %opts = (
'help' => ['h'],
'usage' => ['u'],
view all matches for this distribution
view release on metacpan or search on metacpan
close $f;
my $before = count(curdir());
cmp_ok($before, '>', 0, "ARGV $before");
{
local @ARGV = (1);
mkpath('3rd', !shift, 0755);
}
is(count(curdir()), $before + 1, "third after $before");
$before = count(curdir());
{
local @ARGV = (1);
mkpath('4th', !shift, 0755);
}
is(count(curdir()), $before + 1, "fourth after $before");
{
$dir = catdir($tmp_base, 'ZZ');
@created = mkpath($dir);
is(scalar(@created), 1, "create a ZZ directory");
local @ARGV = ($dir);
rmtree( [grep -e $_, @ARGV], 0, 0 );
ok(!-e $dir, "blow it away via \@ARGV");
}
SKIP : {
view all matches for this distribution
view release on metacpan or search on metacpan
RdistByRsync.pm view on Meta::CPAN
sub rdist
{
my (@argv) = @_;
local(@ARGV) = @argv;
our(@hosts);
our(%definitions);
our(@rsync_options);
our(@targets);
view all matches for this distribution
view release on metacpan or search on metacpan
t/testlib.pl view on Meta::CPAN
use warnings;
require File::Spec;
require File::Path;
sub main_argv { local @ARGV = @_; main() }
my $tempdir;
sub tempdir {
my $d = 'temp' . $$;
t/testlib.pl view on Meta::CPAN
if ( our $warn ) { $warn =~ s/^/WARN: /mg; diag($warn); }
if ( our $print ) { $print =~ s/^/PRINT: /mg; diag($print); }
}
sub options {
local @ARGV = @_;
# Test must File::Rename::Options->import
# using either C<use File::Rename>
# or C<use File::Rename::Options>
my $opt = File::Rename::Options::GetOptions(1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Replace/Inplace.pod view on Meta::CPAN
REMEMBER to keep these examples in sync with 91_author_pod.t
use File::Replace qw/inplace/;
{
my $inpl = inplace( backup=>'.bak' );
local @ARGV = ("file1.txt", "file2.txt");
while (<>) {
chomp;
s/[aeiou]/_/gi;
print $_, "\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
script/rsybak view on Meta::CPAN
# __gen_iter(\*STDIN, $as, $an) :
# $is_ary ? [<STDIN>] :
# do {local $/; ~~<STDIN>};
# $r->{args}{"-cmdline_src_$an"} = 'stdin';
# } elsif ($src eq 'stdin_or_file' || $src eq 'stdin_or_files') {
# local @ARGV = @ARGV;
# unshift @ARGV, $r->{args}{$an}
# if defined $r->{args}{$an};
#
# splice @ARGV, 1
# if @ARGV > 1 && $src eq 'stdin_or_file';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/RsyncP.pm view on Meta::CPAN
}
#
# process rsync options
#
local(@ARGV);
$rs->{rsyncOpts} = {};
@ARGV = @{$rs->{rsyncArgs}};
my $p = new Getopt::Long::Parser(
config => ["bundling", "pass_through"],
lib/File/RsyncP.pm view on Meta::CPAN
# Strip the exclude and include arguments from the given argument list
#
sub excludeStrip
{
my($rs, $args) = @_;
local(@ARGV);
my $p = new Getopt::Long::Parser(
config => ["bundling", "pass_through"],
);
@ARGV = @$args;
view all matches for this distribution
view release on metacpan or search on metacpan
t/file_sharedir_dist_install.t view on Meta::CPAN
chdir tempdir( CLEANUP => 1 );
my $dir = install_dir 'Foo-Bar-Baz';
{
local @ARGV = ('Foo-Bar-Baz', key5 => 'val5');
install_config_set;
}
ok -d $dir, 'directory created';
my $config = install_config_get 'Foo-Bar-Baz';
t/file_sharedir_dist_install.t view on Meta::CPAN
chdir tempdir( CLEANUP => 1 );
create_faux_share;
{
local @ARGV = ('share', 'Foo-Bar-Baz');
install;
}
ok -f 'blib/lib/auto/share/dist/Foo-Bar-Baz/blarpho1.txt';
ok -f 'blib/lib/auto/share/dist/Foo-Bar-Baz/blarpho1/blarpho2.txt';
view all matches for this distribution
view release on metacpan or search on metacpan
t/10_makefile.t view on Meta::CPAN
(AUTHOR => 'Philip Gwyn <fil@localdomain>') : ()),
);
sub slurp
{
local @ARGV = @_;
local $/;
local $.;
<>;
};
view all matches for this distribution
view release on metacpan or search on metacpan
my $proc_file = "/proc/$$/auxv";
SKIP: {
skip "Can't find pseudo file: $proc_file", 1 unless -r $proc_file;
my $data_do = do{ local( @ARGV, $/ ) = $proc_file; <> };
my $data_slurp = read_file($proc_file);
is($data_do, $data_slurp, 'pseudo');
}
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
t/40_stubb.t view on Meta::CPAN
}
sub new_stubb {
local @ARGV = @_;
return File::Stubb->init;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/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/File/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
lib/Filesys/DiskUsage/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/Filesys/DiskUsage/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
easyxs/ppport.h view on Meta::CPAN
$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;
easyxs/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
Call/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;
Call/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
lib/Finance/OFX/Parse.pm view on Meta::CPAN
sub parse_file
{
my $file = shift;
return undef unless $file;
# my $text = do { local(@ARGV, $/) = $file; <> };
my $text = read_file($file);
return undef unless $text;
return parse($text);
}
view all matches for this distribution
view release on metacpan or search on metacpan
xs/include/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;
xs/include/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
scripts/typetuner view on Meta::CPAN
#the $opt_? vars are declared above as globals
#initialize them here on each call
#the list of $opt_? vars here MUST match the list above!!!
foreach ($opt_h, $opt_d, $opt_f, $opt_t, $opt_m, $opt_n, $opt_o, $opt_v, $opt_x)
{$_ = undef;}
local (@ARGV) = @_; #use 'local' instead of 'my' so &getopts works right
getopts($opt_str); #sets $opt_?'s and removes the switches from @ARGV
if (scalar @ARGV == 0 || $opt_h)
{Usage_print;}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Footprintless/Util.pm view on Meta::CPAN
sub slurp {
my ($file) = @_;
# http://www.perl.com/pub/2003/11/21/slurp.html
return $file
? do { local ( @ARGV, $/ ) = $file; <> }
: do { local $/; <STDIN> };
}
sub spurt {
my ( $content, $file, %options ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/forked_harness.pl view on Meta::CPAN
my $userathost = $ENV{USER} . '@' . $ENV{HOSTNAME};
my $ssh = Forks::Super::Config::CONFIG_external_program("ssh");
if ($ssh && $userathost =~ /.@./) {
my @cmds = ("true", "echo", "dir");
foreach my $cmd (@cmds) {
local $SIG{ALRM} = sub { die "ssh timeout $$ $0 @ARGV\n"; };
alarm 15;
if (eval {my $c1=system($ssh, $userathost, $cmd);$c1==0}) {
$ENV{TEST_SSH_TARGET} = "ssh://$userathost";
print STDERR
"... publickey on current user,host works!\n";
view all matches for this distribution