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


Plack-App-MCCS

 view release on metacpan or  search on metacpan

local/lib/perl5/App/Cmd/ArgProcessor.pm  view on Meta::CPAN


# ABSTRACT: App::Cmd-specific wrapper for Getopt::Long::Descriptive

sub _process_args {
  my ($class, $args, @params) = @_;
  local @ARGV = @$args;

  require Getopt::Long::Descriptive;
  Getopt::Long::Descriptive->VERSION(0.084);

  my ($opt, $usage) = Getopt::Long::Descriptive::describe_options(@params);

 view all matches for this distribution


Plack-App-Proxy-Anonymous

 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



Plack-App-SeeAlso

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

        push_seealso [ uc($id) ], "1:$id", "2:$id", "3:$id";
    },
#    Stylesheet => 1,
);

sub read_file { do { local( @ARGV, $/ ) = $_[0] ; <> } }

test_psgi $app, sub {
    my $cb  = shift;

    my $res = $cb->(GET "/?id=a:b&format=seealso");

 view all matches for this distribution


Plack-Middleware-GepokX-ModSSL

 view release on metacpan or  search on metacpan

t/02certs.t  view on Meta::CPAN


if (my $child = fork)
{
	sleep 1;
	my $got_cert      = get('/test');
	my $expected_cert = do { local(@ARGV, $/) = $ENV{HTTPS_CERT_FILE}; <> };
	
	is(parsed($got_cert), parsed($expected_cert));
	kill 9, $child; # a bit harsh, I know
	exit(0);
}

 view all matches for this distribution




Plack-Middleware-TazXSLT

 view release on metacpan or  search on metacpan

t/transform.t  view on Meta::CPAN

use lib "$Bin/lib";
use MockUserAgent;

sub read_file {
	my $file = shift;
	return do { local(@ARGV,$/) = $file;<> }
}

my $backend = sub {
    my $env     = shift;
    my $request = Plack::Request->new($env);

 view all matches for this distribution


Plack-Middleware-TrafficLog

 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


Plack

 view release on metacpan or  search on metacpan

lib/Plack/Runner.pm  view on Meta::CPAN

}

sub parse_options {
    my $self = shift;

    local @ARGV = @_;

    # From 'prove': Allow cuddling the paths with -I, -M and -e
    @ARGV = map { /^(-[IMe])(.+)/ ? ($1,$2) : $_ } @ARGV;

    my($host, $port, $socket, @listen);

 view all matches for this distribution


Plate

 view release on metacpan or  search on metacpan

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;

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


Pod-Confluence

 view release on metacpan or  search on metacpan

t/lib/Pod/Confluence/TestUtil.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


Pod-Cpandoc-Cache

 view release on metacpan or  search on metacpan

t/01_basic.t  view on Meta::CPAN

my @stat_tmpdir = stat $ENV{POD_CPANDOC_CACHE_ROOT};
diag("@stat_tmpdir");


subtest 'no option or -m' => sub {
    local @ARGV = ('Acme::No');
    my ($stdout, $stderr, $exit)  = capture {
        Pod::Cpandoc::Cache->run();
    };
    diag ("$stderr, $exit");

 view all matches for this distribution


Pod-Elemental-Transformer-ExampleRunner

 view release on metacpan or  search on metacpan

lib/Pod/Elemental/Transformer/ExampleRunner.pm  view on Meta::CPAN

sub _source {
    my ($self, $node, $subcommand) = @_;
    my ($filename, @args) = split ' ', $subcommand;
    my $path   = $self->script_path . $filename;
    my $source = do {
        local (@ARGV,$/) = $path;
        <>
    };
    $source = $self->remove_yadas_from($source);
    $source = $self->indent_text_in($source);
    chomp $source;

 view all matches for this distribution


Pod-HtmlHelp

 view release on metacpan or  search on metacpan

WinHtml.pm  view on Meta::CPAN

}

my $hashead;

sub pod2html {
    local(@ARGV) = @_;
    local($/);
    local $_;

    init_globals();

 view all matches for this distribution


Pod-Inherit

 view release on metacpan or  search on metacpan

t/02base.t  view on Meta::CPAN


SKIP: {
  skip "Moose not installed", 1 unless Test::JMM::has_moose;
  my $pi_moose = Pod::Inherit->new({ input_files => [ 't/auxlib/MooseSub.pm' ] });
  $pi_moose->write_pod;
  my $output = do { local (@ARGV, $/) = "t/auxlib/MooseSub.pod"; <> || 'NO OUTPUT' };
  $output =~ s/=item L<Moose::Object>\n\n(.+)/=item L<Moose::Object>\n\n(some methods here)/;
  eq_or_diff(
        $output,
        do { local (@ARGV, $/) = "t/baseline/auxlib/MooseSub.pod"; <> || 'NO BASELINE' },
        "MooseSub - Moose extends, existing POD - out_dir unset");
#  ok(!-e 't/lib/MooseSub.pod', "Moose extends, existing POD");
  unlink "t/auxlib/MooseSub.pod";
}

SKIP: {
  skip "Class::C3 not installed", 1 unless Test::JMM::has_c3;
  my $pi_c3 = Pod::Inherit->new({ input_files => [ 't/auxlib/ClassC3Sub.pm' ] });
  $pi_c3->write_pod;
  eq_or_diff(
        do { local (@ARGV, $/) = "t/auxlib/ClassC3Sub.pod";          <> || 'NO OUTPUT' },
        do { local (@ARGV, $/) = "t/baseline/auxlib/ClassC3Sub.pod"; <> || 'NO BASELINE' },
        'ClassC3Sub - "use base" Class::C3 class, existing POD - out_dir unset');
#  ok(!-e 't/lib/ClassC3Sub.pod', '"use base" Class::C3 class, existing POD');
  unlink "t/auxlib/ClassC3Sub.pod";
}

 view all matches for this distribution


Pod-L10N

 view release on metacpan or  search on metacpan

lib/Pod/L10N/Html.pm  view on Meta::CPAN

    $Header = 0;                # produce block header/footer
    $Title = undef;             # title to give the pod(s)
}

sub pod2htmll10n {
    local(@ARGV) = @_;
    local $_;

    init_globals();
    parse_command_line();

 view all matches for this distribution


Pod-Markdown-Passthrough

 view release on metacpan or  search on metacpan

lib/Pod/Markdown/Passthrough.pm  view on Meta::CPAN

# Read the contents of a file and stash in object.
sub parse_from_file {
    my $self = shift;
    my $file = shift;

    $self->{_markdown} = do { local ( @ARGV, $/ ) = $file; <> };

}

# Return any stashed raw file content.
sub as_markdown {

 view all matches for this distribution


Pod-Pandoc

 view release on metacpan or  search on metacpan

t/app-pod2pandoc-meta.t  view on Meta::CPAN

  unless $ENV{RELEASE_TESTING};

sub pod2meta {
    my ( $fh, $file ) = tempfile;
    pod2pandoc ['script/pod2pandoc'], {@_}, '-t' => 'json', '-o', $file;
    my $json = do { local ( @ARGV, $/ ) = $file; <> };
    pandoc_json($json)->metavalue;
}

my $expect = {
    file     => 'script/pod2pandoc',

 view all matches for this distribution


Pod-Pdf

 view release on metacpan or  search on metacpan

Pdf.pm  view on Meta::CPAN

my $date = '';                           # Footer date string
my $h_str = 'pod2pdf';                   # Inside string for header
my $section = '';                        # Section type: 'doc', 'cat', 'ind', etc.

sub pod2pdf {
	local @ARGV = @_;
	unless ( @ARGV && $ARGV[0] ) { die "no input, no output!\n" }
	
	parse_command_line();

	unless ($ARGV[0]) {

 view all matches for this distribution


Pod-Simple-XHTML-BlendedCode

 view release on metacpan or  search on metacpan

inc/inc_Module-Build/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) = @_;

inc/inc_Module-Build/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


Pod-Simple

 view release on metacpan or  search on metacpan

lib/Pod/Simple/HTMLLegacy.pm  view on Meta::CPAN


  {
    my($help);

    my($netscape); # dummy
    local @ARGV = @args;
    GetOptions(
      "help"       => \$help,
      "verbose!"   => \$verbose,
      "infile=s"   => \$infile,
      "outfile=s"  => \$outfile,

 view all matches for this distribution


Pod-Site

 view release on metacpan or  search on metacpan

t/config.t  view on Meta::CPAN

    man             => undef,
    help            => undef,
);

DEFAULTS: {
    local @ARGV = ('--doc-root', $doc_root, '--base-uri', $base_uri, $mod_root );
    is_deeply $CLASS->_config, \%config, 'Should have default config';
}

ERRS: {
    my $mock = Test::MockModule->new($CLASS);
    my @args;
    $mock->mock(_pod2usage => sub { @args = @_} );
    local @ARGV = ($mod_root);
    ok $CLASS->_config, 'configure with no options';
    is_deeply \@args, [
        $CLASS,
        '-message', 'Missing required --doc-root and --base-uri options',
    ], 'Should have been helped';

t/config.t  view on Meta::CPAN

        '-message', 'Missing path to module root',
    ], 'Should have been helped again';
}

MULTIPLES: {
    local @ARGV = (
        '--doc-root' => $doc_root,
        '--base-uri' => $base_uri,
        '--base-uri' => '/whatever',
        $mod_root, '/another/root'
    );

t/config.t  view on Meta::CPAN


HELP: {
    my $mock = Test::MockModule->new($CLASS);
    my @args;
    $mock->mock(_pod2usage => sub { @args = @_} );
    local @ARGV = ('--doc-root', $doc_root, '--base-uri', $base_uri, $mod_root, '--help' );
    ok $CLASS->_config, 'Ask for help';
    is_deeply \@args, [ $CLASS, '-exitval', 0 ], 'Should have been helped';
    @ARGV = ('--doc-root', $doc_root, '--base-uri', $base_uri, $mod_root, '-h' );
    ok $CLASS->_config, 'Ask for help short';
    is_deeply \@args, [ $CLASS, '-exitval', 0 ], 'Should have been helped again';

t/config.t  view on Meta::CPAN

    is_deeply \@args, [ $CLASS, '-sections', '.+', '-exitval', 0 ],
        'Should have been manned again';
}

LOTS: {
    local @ARGV = (
        '--doc-root'      => $doc_root,
        '--base-uri'      => $base_uri,
        '--favicon-uri'   => 'my.icon',
        '--sample-module' => 'lib/Hello.pm',
        '--main-module'   => 'lib/Bye.pm',

t/config.t  view on Meta::CPAN

        help            => undef,
    }, 'Lots of opts should work';
}

SHORT: {
    local @ARGV = (
        '-d' => $doc_root,
        '-u' => $base_uri,
        '-s' => 'lib/Hello.pm',
        '-m' => 'lib/Bye.pm',
        '-i' => 'default.htm',

t/config.t  view on Meta::CPAN

    }, 'Lots of short opts should work';

}

NEGATED: {
    local @ARGV = (
        '--doc-root'      => $doc_root,
        '--base-uri'      => $base_uri,
        '--no-versioned-title',
        $mod_root,
    );

 view all matches for this distribution


Pod-Stupid

 view release on metacpan or  search on metacpan

lib/Pod/Stupid.pm  view on Meta::CPAN

=head1 SYNOPSIS

  use Pod::Stupid;
  
  my $file = shift; # '/some/file/with/pod.pl';
  my $original_text = do { local( @ARGV, $/ ) = $file; <> }; # slurp
  
  my $ps = Pod::Stupid->new();
  
  # in scalar context returns an array of hashes.
  my $pieces = $ps->parse_string( $original_text );

 view all matches for this distribution


Pod-Thread

 view release on metacpan or  search on metacpan

bin/pod2thread  view on Meta::CPAN

use Pod::Usage qw(pod2usage);

# Insert -- into @ARGV before any single dash argument to hide it from
# Getopt::Long; we want to interpret it as meaning stdin.
my $stdin;
local @ARGV = map { $_ eq q{-} && !$stdin++ ? (q{--}, $_) : $_ } @ARGV;

# Parse our options.
my @options = qw(contents|c help|h navbar|n style|s=s title|t=s);
my %options;
Getopt::Long::config('bundling');

 view all matches for this distribution


Pod-Weaver-Plugin-Include

 view release on metacpan or  search on metacpan

t/lib/TestPW.pm  view on Meta::CPAN

    is      => 'rw',
    lazy    => 1,
    builder => 'initDocPPI',
);

sub slurp_file { local ( @ARGV, $/ ) = @_; <> }

sub run_in_dir {
    shift if $_[0]->isa(__PACKAGE__);    # Take TestPW->run_in_dir into account.
    my $dir = shift;

 view all matches for this distribution


Pod-Weaver-Plugin-StopWords

 view release on metacpan or  search on metacpan

t/lib/TestPW.pm  view on Meta::CPAN

$zilla->set_always(stash_named => undef);
$zilla->mock(copyright_holder => sub { $_[0]->license->holder });
# proposed changes to Pod::Weaver::Section::Legal look for a license file.  we can ignore that for these tests.
$zilla->set_always(files => []);

sub slurp_file { local (@ARGV, $/) = @_; <> }

sub test_basic {
  my ($weaver, $input, $stopwords) = @_;
  my $expected = $input->{expected};

 view all matches for this distribution


Prima

 view release on metacpan or  search on metacpan

Prima.pm  view on Meta::CPAN


In cases where Prima argument parsing conflicts with application options, use
L<Prima::noARGV> to disable automatic parsing; also see L<parse_argv>. 
Alternatively, the construct 

	BEGIN { local @ARGV; require Prima; } 

will also do.

=head1 SEE ALSO

 view all matches for this distribution


Primesieve

 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


Proc-Exists

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

  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


( run in 1.319 second using v1.01-cache-2.11-cpan-49f99fa48dc )