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


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


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

    my $class = shift;
    return bless {}, $class;
}

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

    my $self = Pod::L10N::Html->new();
    $self->init_globals();

 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


Promise-XS

 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


Protocol-OTR

 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


Protocol-Redis-XS

 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


Puncheur

 view release on metacpan or  search on metacpan

t/004_runner.t  view on Meta::CPAN

    is     $runner->{app}, 'TestPuncheur';
    is     $runner->{app_options}{port}, 9876;
};

subtest 'no parse_options with ARGV' => sub {
    local @ARGV = qw/-p 6666 -s SSS/;
    my $runner = Puncheur::Runner->new(TestPuncheur => {
        port => 9876,
        server => 'TTT',
    });

t/004_runner.t  view on Meta::CPAN

};



subtest 'parse_options with ARGV' => sub {
    local @ARGV = qw/-p 6666 -s SSS/;
    my $runner = Puncheur::Runner->new(TestPuncheur2 => {
        port   => 9876,
        server => 'TTT',
    });

 view all matches for this distribution


QBit-TimeLog-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


QDBM_File

 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


QMake-Project

 view release on metacpan or  search on metacpan

lib/QMake/Project.pm  view on Meta::CPAN

    };

    Getopt::Long::Configure( 'permute', 'pass_through' );

    {
        local @ARGV = $self->_split_command_to_words( $command );

        # The first element is the qmake binary itself
        $qmake = shift @ARGV;

        GetOptions(

 view all matches for this distribution


Qgoda

 view release on metacpan or  search on metacpan

lib/Qgoda/Command.pm  view on Meta::CPAN

    $path = './' . $path if !File::Spec->file_name_is_absolute($path);

    $^W = 1 if $ENV{'PERLDOCDEBUG'};
    pop @INC if $INC[-1] eq '.';
    require Pod::Perldoc;
    local @ARGV = ($path);
    exit(Pod::Perldoc->run());
}

1;

 view all matches for this distribution


Qt

 view release on metacpan or  search on metacpan

qtcore/src/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 0.459 second using v1.01-cache-2.11-cpan-62ea2d55848 )