Result:
found more than 1414 distributions - search limited to the first 2001 files matching your query ( run in 0.863 )


Minilla

 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


MobaSiF-Template

 view release on metacpan or  search on metacpan

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;

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


Mobile-Libwurfl

 view release on metacpan or  search on metacpan

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;

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


Module-Build-Pluggable-XSUtil

 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


Module-Build-Pluggable

 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


Module-Build-TestReporter

 view release on metacpan or  search on metacpan

t/base.t  view on Meta::CPAN

}

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


Module-Build-Tiny

 view release on metacpan or  search on metacpan

t/simple.t  view on Meta::CPAN

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


Module-Build

 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


Module-Depends-Tree

 view release on metacpan or  search on metacpan

deptree  view on Meta::CPAN

    '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


Module-Info

 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


Module-New

 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


Module-OTRS-CoreList

 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


Module-Release-CSJEWELL

 view release on metacpan or  search on metacpan

script/release-csjewell.pl  view on Meta::CPAN

	}

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# get the release object
my %params;
$params{local}  = shift @ARGV if @ARGV;

if( @ARGV )
	{
    $params{remote} = shift @ARGV;
	}

 view all matches for this distribution


Module-Release

 view release on metacpan or  search on metacpan

script/release  view on Meta::CPAN

	}

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# get the release object
my %params;
$params{local}  = shift @ARGV if @ARGV;

if( @ARGV ) {
	$params{remote} = shift @ARGV;
	}
elsif( $params{local} ) {

 view all matches for this distribution


Module-Setup

 view release on metacpan or  search on metacpan

t/010_core/setup_options.t  view on Meta::CPAN

filters { input => [qw/lines chomp/], argv => [qw/lines chomp array/], options => 'yaml' };

run {
    my $block = shift;

    local @ARGV = $block->input;
    my $self = Module::Setup->new->setup_options;
    my $options = {
        target             => undef,
        plugins            => undef,
        direct             => undef,

 view all matches for this distribution


Module-Starter-CSJEWELL

 view release on metacpan or  search on metacpan

lib/Module/Starter/CSJEWELL.pm  view on Meta::CPAN

		File::Spec->catdir( $self->{basedir}, 'xt', 'author' ),
	  )
	{

		if ( not -d $tdir ) {
			local @ARGV = $tdir;
			mkpath();
			$self->progress("Created $tdir");
		}
	} ## end foreach my $tdir ( File::Spec...)

lib/Module/Starter/CSJEWELL.pm  view on Meta::CPAN

	# Create the directories...
	my $template_dir =
	  File::Spec->catdir( $ENV{HOME}, '.module-starter', 'CSJEWELL' );
	if ( not -d $template_dir ) {
		print {*STDERR} "Creating $template_dir...";
		local @ARGV = $template_dir;
		mkpath;
		print {*STDERR} "done.\n";
	}

	my $template_test_dir =
	  File::Spec->catdir( $ENV{HOME}, '.module-starter', 'CSJEWELL', 't' );
	if ( not -d $template_test_dir ) {
		print {*STDERR} "Creating $template_test_dir...";
		local @ARGV = $template_test_dir;
		mkpath;
		print {*STDERR} "done.\n";
	}

	my $template_xtest_dir =
	  File::Spec->catdir( $ENV{HOME}, '.module-starter', 'CSJEWELL', 'xt' );
	if ( not -d $template_xtest_dir ) {
		print {*STDERR} "Creating $template_xtest_dir...";
		local @ARGV = $template_xtest_dir;
		mkpath;
		print {*STDERR} "done.\n";
	}

	my $template_authortest_dir =
	  File::Spec->catdir( $ENV{HOME}, '.module-starter', 'CSJEWELL', 'xt',
		'author' );
	if ( not -d $template_authortest_dir ) {
		print {*STDERR} "Creating $template_authortest_dir...";
		local @ARGV = $template_authortest_dir;
		mkpath;
		print {*STDERR} "done.\n";
	}

	my $template_authortest_settings =
	  File::Spec->catdir( $ENV{HOME}, '.module-starter', 'CSJEWELL', 'xt',
		'settings' );
	if ( not -d $template_authortest_settings ) {
		print {*STDERR} "Creating $template_authortest_settings...";
		local @ARGV = $template_authortest_settings;
		mkpath;
		print {*STDERR} "done.\n";
	}

	# Create or update the config file (making a backup, of course)...

 view all matches for this distribution


Module-Starter-PBP

 view release on metacpan or  search on metacpan

lib/Module/Starter/PBP.pm  view on Meta::CPAN

    # Create the directories...
    my $template_dir
        = File::Spec->catdir( $ENV{HOME}, '.module-starter', 'PBP' );
    if ( not -d $template_dir ) {
        print {*STDERR} "Creating $template_dir...";
        local @ARGV = $template_dir;
        mkpath;
        print {*STDERR} "done.\n";
    }

    my $template_test_dir
        = File::Spec->catdir( $ENV{HOME}, '.module-starter', 'PBP', 't' );
    if ( not -d $template_test_dir ) {
        print {*STDERR} "Creating $template_test_dir...";
        local @ARGV = $template_test_dir;
        mkpath;
        print {*STDERR} "done.\n";
    }

    # Create or update the config file (making a backup, of course)...

 view all matches for this distribution


Module-Starter-Smart

 view release on metacpan or  search on metacpan

lib/Module/Starter/Smart.pm  view on Meta::CPAN

    my @dirparts = ( $self->{basedir}, 'lib', @parts );
    my $manifest_file = join( "/", "lib", @parts, $filepart );
    if ( @dirparts ) {
        my $dir = File::Spec->catdir( @dirparts );
        if ( not -d $dir ) {
            local @ARGV = $dir;
            mkpath @ARGV;
            $self->progress( "Created $dir" );
        }
    }

lib/Module/Starter/Smart.pm  view on Meta::CPAN

    my $content  = shift;

    my @dirparts = ( $self->{basedir}, $testdir );
    my $tdir = File::Spec->catdir( @dirparts );
    if ( not -d $tdir ) {
        local @ARGV = $tdir;
        mkpath();
        $self->progress( "Created $tdir" );
    }

    my $fname = File::Spec->catfile( @dirparts, $filename );

 view all matches for this distribution


Module-Starter-TOSHIOITO

 view release on metacpan or  search on metacpan

lib/Module/Starter/TOSHIOITO.pm  view on Meta::CPAN


sub _ensure_dir {
    my ($self, @dirpaths) = @_;
    my $dir = File::Spec->catdir($self->{basedir}, @dirpaths);
    if (not -d $dir) {
        local @ARGV = $dir;
        mkpath();
        $self->progress("Created $dir");
    }
}

 view all matches for this distribution


Modulino-Demo

 view release on metacpan or  search on metacpan

lib/Modulino/Demo.pm  view on Meta::CPAN


sub doc {
	say "Running as docs";

	my $data = do {
		local( @ARGV, $/ ) = __FILE__;
		<>;
		};

	my $package = __PACKAGE__;
	$data =~ s/__PACKAGE__/$package/;

 view all matches for this distribution


MogileFS-Plugin-MultiHook

 view release on metacpan or  search on metacpan

t/01-use.t  view on Meta::CPAN


use MogileFS::Server;
use MogileFS::Config;

{
    local @ARGV = qw/--skipconfig --plugins MultiHook/;

    eval {
        MogileFS::Config->load_config;
    };
    ok(!$@);

 view all matches for this distribution


Mojo-Base-XS

 view release on metacpan or  search on metacpan

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;

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


Mojo-Webqq

 view release on metacpan or  search on metacpan

lib/Mojo/Webqq/Plugin/Perldoc.pm  view on Meta::CPAN

            $msg->allow_plugin(0);
            return if $msg->class eq "send" and $msg->from ne "api" and $msg->from ne "irc";
            my($p,$v) = ("-$1",$2);
            $client->spawn(
                cmd  =>sub{
                    local @ARGV=($p,$v);
                    require 5;
                    exit(Pod::Perldoc->run());
                },
                exec_timeout => 5,
                exit_cb => sub {

 view all matches for this distribution


Mojo-Weixin

 view release on metacpan or  search on metacpan

lib/Mojo/Weixin/Plugin/Perldoc.pm  view on Meta::CPAN

            $msg->allow_plugin(0);
            return if $msg->from eq "bot";
            my($p,$v) = ("-$1",$2);
            $client->spawn(
                cmd  =>sub{
                    local @ARGV=($p,$v);
                    require 5;
                    exit(Pod::Perldoc->run());
                },
                exec_timeout => 5,
                exit_cb => sub {

 view all matches for this distribution


Mojolicious-Command-generate-lexicon

 view release on metacpan or  search on metacpan

lib/Mojolicious/Command/generate/lexicon.pm  view on Meta::CPAN


    $language ||= 'Skeleton';

    my $behavior = '';

    local @ARGV = @_ if @_;

    my $result = GetOptions(
        "behavior|b:s{1,1}" => \$behavior,
        'verbose|v:1'       => \$verbose,
    );

 view all matches for this distribution


Mojolicious-Command-nopaste

 view release on metacpan or  search on metacpan

lib/Mojolicious/Command/nopaste/Service.pm  view on Meta::CPAN

  my ($self, @files) = @_;
  @files = @{ $self->files } unless @files;

  my $content = do {
    local $/;
    local @ARGV = @files;
    decode 'UTF-8', <>;
  };

  # Remove trailing newline as some sites won't do it for us
  chomp $content;

 view all matches for this distribution


Mojolicious-Command-static

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

ok eval "require Mojolicious::Command::static; 1", "load Mojolicious::Command::static";

# Make sure @ARGV is not changed
{
  local $ENV{MOJO_MODE};
  local @ARGV = qw(-m production -x whatever);
  require Mojolicious::Commands;
}

my $t = Test::Mojo->new;
my $commands = Mojolicious::Commands->new;

 view all matches for this distribution


Mojolicious-Plugin-AssetPack-Pipe-ElmLang

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/AssetPack/Pipe/ElmLang.pm  view on Meta::CPAN

            
            push @args , $file->path->to_string;

            $self->run(\@args, undef, undef);

            my $js = do { local(@ARGV, $/) = $tmp; <> };

            $asset->content($store->save(\$js, $attrs))->FROM_JSON($attrs);
        }
    );
}

 view all matches for this distribution


Mojolicious-Plugin-DirectoryServer

 view release on metacpan or  search on metacpan

lib/iniweb.pm  view on Meta::CPAN


sub import {
	$ENV{PERL_MINIWEB_ROOT}       //= '.';
	$ENV{PERL_MINIWEB_DIR_INDEX}  //= 'index.html:index.htm';

	local @ARGV = 'daemon';
	my %opts = (
		root       => $ENV{PERL_MINIWEB_ROOT},
		dir_index  => [ split ':', $ENV{PERL_MINIWEB_DIR_INDEX} ],
	);
	a->plugin( DirectoryServer => %opts )->start;

 view all matches for this distribution


Mojolicious

 view release on metacpan or  search on metacpan

t/mojo/util.t  view on Meta::CPAN

  getopt $array, 'h' => \my $flag, 'w|whatever=s' => \my $whatever;
  ok $flag, 'flag has been set';
  is $whatever, 'Whatever!', 'right string';
  is_deeply $array, ['stuff'], 'right structure';
  {
    local @ARGV = ('--charset', 'UTF-16', 'test');
    getopt 'c|charset=s' => \my @charset;
    is_deeply \@charset, ['UTF-16'], 'right structure';
    is_deeply \@ARGV,    ['test'],   'right structure';
  }
};

 view all matches for this distribution


( run in 0.863 second using v1.01-cache-2.11-cpan-beeb90c9504 )