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/Maven/Xml/XmlFile.pm view on Meta::CPAN
my $xml_string = $options{string};
if ( !$xml_string && $options{file} ) {
$logger->debugf( 'loading xml from file %s', $options{file} );
# http://www.perl.com/pub/2003/11/21/slurp.html
$xml_string = do { local ( @ARGV, $/ ) = $options{file}; <> };
}
if ( !$xml_string && $options{url} ) {
$logger->debugf( 'loading xml from uri %s', $options{url} );
my $agent = $options{agent};
if ( !$agent ) {
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
$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
lib/Maypole/CLI.pm view on Meta::CPAN
sub send_output { $buffer = shift->{output} }
sub call_url {
my $self = shift;
local @ARGV = @_;
$package->handler() == OK and return $buffer;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Media/LibMTP/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/Media/LibMTP/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
lib/Menlo/CLI/Compat.pm view on Meta::CPAN
}
sub parse_options {
my $self = shift;
local @ARGV = @{$self->{argv}};
push @ARGV, grep length, split /\s+/, $self->env('OPT');
push @ARGV, @_;
Getopt::Long::Configure("bundling");
Getopt::Long::GetOptions(
view all matches for this distribution
view release on metacpan or search on metacpan
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;
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
t/configfile.t view on Meta::CPAN
use_ok 'Message::Passing';
my $i;
{
local @ARGV = ('--configfile', $path);
$i = Message::Passing->new_with_options;
}
ok $i;
is $i->input, 'Null';
view all matches for this distribution
view release on metacpan or search on metacpan
bin/message_score.pl view on Meta::CPAN
$scores{$from}||=[];
push @{ $scores{$from} }, $score;
}
sub scorethese {
local(@ARGV)=@_;
my @article;
while(<>) {
chomp;
if(/^From /) {
scorethis(\@article);
view all matches for this distribution
view release on metacpan or search on metacpan
$Metabase::Client::Simple::VERSION ||= "0.123456"; # for prove in repo dir
my $ver = Metabase::Client::Simple->VERSION;
my $id_file = File::Spec->catfile(qw/t data id.json/);
my $guts = do { local ( @ARGV, $/ ) = $id_file; <> };
my $id_pair = JSON()->new->decode($guts);
my $profile = Metabase::User::Profile->from_struct( $id_pair->[0] );
my $secret = Metabase::User::Secret->from_struct( $id_pair->[1] );
view all matches for this distribution
view release on metacpan or search on metacpan
t/user/profile.t view on Meta::CPAN
ok( -r $output_file, 'created named profile file with metabase-profile' );
qx/$X $bin --name "JohnPublic" --email jp\@example.com --secret 3.14159/;
ok( -r 'metabase_id.json', 'created default profile file with metabase-profile' );
my $file_guts = do { local ( @ARGV, $/ ) = 'metabase_id.json'; <> };
my $facts = $json->decode($file_guts);
my $profile_copy2 = Metabase::User::Profile->from_struct( $facts->[0] );
ok( $profile_copy2, "Loaded profile from file" );
my $secret_copy2 = Metabase::User::Secret->from_struct( $facts->[1] );
ok( $secret_copy2, "Loaded secret from file" );
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
WIP/bin/mildew view on Meta::CPAN
# fake environment
local %ENV = $info->environment;
local $0 = $info->program_name;
chdir $info->working_directory;
local @ARGV = $info->cmdline_args;
MAIN;
},
);
$server->start;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Minilla/CLI.pm view on Meta::CPAN
sub run {
my ($self, @args) = @_;
local $Minilla::AUTO_INSTALL = 1;
local $Minilla::Logger::COLOR = -t STDOUT ? 1 : 0;
local @ARGV = @args;
my @commands;
my $version;
my $p = Getopt::Long::Parser->new(
config => [ "no_ignore_case", "pass_through" ],
);
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
t/Devel-WantXS.t view on Meta::CPAN
for (@data) {
my ($expected, $perl_only, $args, $argv) = @$_;
local $Devel::WantXS::_CACHE;
local $ENV{PERL_ONLY} = $perl_only;
local @ARGV;
push @ARGV, $argv if $argv;
is(want_xs($args) || 0, $expected);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Module/Build/Pluggable.pm view on Meta::CPAN
my $pid = fork();
die "fork failed: $!" unless defined $pid;
if ($pid) { # parent
waitpid $pid, 0;
} else { # child
local @ARGV = (@args);
do 'Build';
::ok(!$@) or ::diag $@;
exit 0;
}
}
lib/Test/Module/Build/Pluggable.pm view on Meta::CPAN
my $pid = fork();
die "fork failed: $!" unless defined $pid;
if ($pid) { # parent
waitpid $pid, 0;
} else { # child
local @ARGV = @args;
do 'Build.PL';
::ok(-f 'Build', 'Created Build file') or ::diag $@;
exit 0;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
can_ok( $tr, 'write_report' );
$tr->write_report( 'my report', '+version' );
ok( -e 'report.txt', 'write_report() should write its report' );
my $text = do { local (@ARGV, $/) = 'report.txt'; <> };
is( $text, 'my report+version', '... from the report passed' );
$tr->notes( report_file => '' );
throws_ok
{ $tr->write_report( 'my report' ) }
view all matches for this distribution
view release on metacpan or search on metacpan
my ($guts, $ec);
sub _mod2pm { (my $mod = shift) =~ s{::}{/}g; return "$mod.pm" }
sub _path2mod { (my $pm = shift) =~ s{/}{::}g; return substr $pm, 5, -3 }
sub _mod2dist { (my $mod = shift) =~ s{::}{-}g; return $mod; }
sub _slurp { do { local (@ARGV,$/)=$_[0]; <> } }
#--------------------------------------------------------------------------#
# configure
#--------------------------------------------------------------------------#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Build/Base.pm view on Meta::CPAN
return $package->resume;
}
sub current {
# hmm, wonder what the right thing to do here is
local @ARGV;
return shift()->resume;
}
sub _construct {
my ($package, %input) = @_;
lib/Module/Build/Base.pm view on Meta::CPAN
push @specs, $k . (defined $v->{type} ? $v->{type} : '');
push @specs, $v->{store} if exists $v->{store};
$args->{$k} = $v->{default} if exists $v->{default};
}
local @ARGV = @argv; # No other way to dupe Getopt::Long
# Get the options values and return them.
# XXX Add option to allow users to set options?
if ( @specs ) {
Getopt::Long::Configure('pass_through');
view all matches for this distribution
view release on metacpan or search on metacpan
'help' => sub { die '--workdir and --mirror are the only two options now' },
);
GetOptions( %options ) or die "deptree --help for options.\n";
MAKE_TEMP: {
local @ARGV = ( $Module::Depends::Tree::workdir );
mkpath;
}
MAIN: {
my @topdeps;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Foo.pm view on Meta::CPAN
}
wibble('this is the function call');
{ no strict 'refs'; &{'wibble'}('this is a symref function call'); }
Foo->wibble(42);
{ local @ARGV = (bless {}); shift->wibble(42); }
my $obj = bless {};
$obj->wibble('bar');
my $method = 'wibble';
Foo->$method;
$obj->$method;
view all matches for this distribution
view release on metacpan or search on metacpan
t/10_config.t view on Meta::CPAN
no_prompt => 1,
);
ok $config->file eq $file, 'config file is the sample';
local @ARGV = qw( --author=me --email=me@localhost );
$config->get_options(qw( author=s email=s ));
ok $config->get('author') eq 'me', 'author is correct';
ok $config->get('email') eq 'me@localhost', 'email is correct';
t/10_config.t view on Meta::CPAN
no_prompt => 1,
);
ok $config->file eq $file, 'config file is the sample';
local @ARGV = qw( --email=foo@localhost );
$config->get_options(qw( author=s email=s ));
ok $config->get('author') eq 'me', 'author is correct';
ok $config->get('email') eq 'foo@localhost', 'email is correct';
t/10_config.t view on Meta::CPAN
};
subtest merge => sub {
my $config = Module::New::Config->new( no_prompt => 1 );
local @ARGV = qw(--first=first --second=second);
$config->get_options('first=s');
$config->get_options('second=s');
ok $config->get('first') eq 'first', 'first option';
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/get_modules.pl view on Meta::CPAN
}
$Data::Dumper::Sortkeys = 1;
my $dist_ini_content = do{ local (@ARGV,$/) = File::Spec->catfile( dirname( __FILE__ ), '..', 'dist.ini' ); <> };
my ($dist_version) = $dist_ini_content =~ m{version \s* = \s* (.*?)\n}xms;
my ($dist_author) = $dist_ini_content =~ m{author \s* = \s* (.*?)\n}xms;
my ($dist_license) = $dist_ini_content =~ m{license \s* = \s* (.*?)\n}xms;
my ($dist_c_holder) = $dist_ini_content =~ m{copyright_holder \s* = \s* (.*?)\n}xms;
view all matches for this distribution