view release on metacpan or search on metacpan
lib/Dist/Maker/Template/CLI.pm view on Meta::CPAN
return File::Basename::basename($0);
}
sub new {
my $class = shift;
local @ARGV = @_;
my %opts;
my $success = $class->getopt_parser->getoptions(
\%opts,
$class->getopt_spec());
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Man/Simple.pm view on Meta::CPAN
if ( -e $self->{basedir} ) {
die( "$self->{basedir} already exists. ".
"Use --force if you want to stomp on it.\n"
) unless $self->{force};
local @ARGV = $self->{basedir};
rm_rf();
die "Couldn't delete existing $self->{basedir}: $!\n"
if -e $self->{basedir};
}
CREATE_IT: {
$self->progress( "Created $self->{basedir}" );
local @ARGV = $self->{basedir};
mkpath();
die "Couldn't create $self->{basedir}: $!\n" unless -d $self->{basedir};
}
lib/Dist/Man/Simple.pm view on Meta::CPAN
my $SLASH = q{/};
my $manifest_file = join( $SLASH, '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/Dist/Man/Simple.pm view on Meta::CPAN
my $content = shift;
my @dirparts = ( $self->{basedir}, 't' );
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
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Milla/FirstBuild.pm view on Meta::CPAN
$self->log("Running the initial build & clean");
{
my $wd = File::pushd::pushd($opts->{mint_root});
for my $cmd (['build', '--no-tgz'], ['clean']) {
local @ARGV = (@$cmd);
Dist::Milla::App->run;
}
}
my $git = Git::Wrapper->new("$opts->{mint_root}");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/PolicyFiles.pm view on Meta::CPAN
my $self = shift;
my $contrib_md_tmpl = shift;
croak('Unexpected argument(s)') if @_;
croak('Missing --module: no module specified') unless exists($self->{module});
my $contrib_md_tmpl_str = defined($contrib_md_tmpl) ?
do { local ( *ARGV, $/ ); @ARGV = ($contrib_md_tmpl); <> } : INTERNAL_CONTRIB_MD;
(my $mod_name = (split(/,/, $self->{module}))[0]) =~ s/::/-/g;
my $cpan_rt = "https://rt.cpan.org/NoAuth/ReportBug.html?Queue=$mod_name";
my $repo = $self->{prefix} . ($self->{uncapitalize} ? lc($mod_name) : $mod_name);
my $github_i = "https://github.com/$self->{login}/$repo/issues";
my $tmpl_obj = Text::Template->new(SOURCE => $contrib_md_tmpl_str, TYPE => 'STRING')
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Author/Plicease/MakeMaker.pm view on Meta::CPAN
my @content = do {
my $in = $file->content;
my $out = '';
my $err = '';
local @ARGV = ();
my $error = Perl::Tidy::perltidy(
source => \$in,
destination => \$out,
stderr => \$err,
perltidyrc => Dist::Zilla::Plugin::Author::Plicease->dist_dir->child('perltidyrc')->stringify,
view all matches for this distribution
view release on metacpan or search on metacpan
t/010-basic.t view on Meta::CPAN
sub dz_build {
my $dir = shift;
if (chdir File::Spec->catdir( "t", $dir )) {
local @ARGV = qw<build>;
$rc = Dist::Zilla::App->run;
} else {
fail("Cannot use $dir directory: " . $!);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/App/Command/perltidy.pm view on Meta::CPAN
sub abstract {'perltidy your dist'}
my $backends = {
vanilla => sub {
local @ARGV = ();
require Perl::Tidy;
return sub {
local @ARGV = ();
Perl::Tidy::perltidy(@_);
};
},
sweet => sub {
local @ARGV = ();
require Perl::Tidy::Sweetened;
return sub {
local @ARGV = ();
Perl::Tidy::Sweetened::perltidy(@_);
};
},
};
view all matches for this distribution
view release on metacpan or search on metacpan
t/externaldeps.t view on Meta::CPAN
use Cwd;
use Dist::Zilla::App;
my $cwd = getcwd();
chdir 't/eg';
local @ARGV = ('externaldeps');
my $stdout = stdout_from { Dist::Zilla::App->run };
chdir $cwd;
like( $stdout, qr/man/, 'man is an external prerequisite' );
like( $stdout, qr/sqlite3/, 'sqlite is an external prerequisite' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Author/Plicease/MakeMaker.pm view on Meta::CPAN
my @content = do {
my $in = $file->content;
my $out = '';
my $err = '';
local @ARGV = ();
my $error = Perl::Tidy::perltidy(
source => \$in,
destination => \$out,
stderr => \$err,
perltidyrc => Dist::Zilla::Plugin::Author::Plicease->dist_dir->child('perltidyrc')->stringify,
view all matches for this distribution
view release on metacpan or search on metacpan
Dist-Zilla-PluginBundle-BAREFOOT-0.05_01/t/tdist.t view on Meta::CPAN
done_testing;
sub run_dzil_command
{
local @ARGV = @_;
Dist::Zilla::App->run;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/App/Command/shell.pm view on Meta::CPAN
my $prompt = 'DZ> ';
while (1) {
my $line = $term->readline($prompt);
local @ARGV = Text::ParseWords::shellwords($line);
next unless @ARGV;
last if $ARGV[0] =~ /\A(?:exit|x|quit|q)\z/;
if (exists $builtins{$ARGV[0]}) {
local $@;
view all matches for this distribution
view release on metacpan or search on metacpan
t/0.90/can/Data_Object_Args_exists.t view on Meta::CPAN
use Data::Object::Args;
can_ok "Data::Object::Args", "exists";
local @ARGV = ('--command', 'post', '--action', 'users');
my $data = Data::Object::Args->new(
named => { command => 0, action => 1 }
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Doc/Simply/App.pm view on Meta::CPAN
my @arguments = @_;
my ( $help, $type );
$type = 'slash-star';
{
local @ARGV = @arguments;
GetOptions(
'type=s' => \$type,
'help|h|?' => \$help,
);
view all matches for this distribution
view release on metacpan or search on metacpan
t/test_docopt.py.t view on Meta::CPAN
is_deeply($args->{'-x'}, True);
is_deeply($args->{'-y'}, undef);
};
subtest 'test_issue_65_evaluate_argv_when_called_not_when_imported' => sub {
local @ARGV = qw(-a);
is_deeply(docopt(doc => 'usage: prog [-ab]'), {'-a' => True, '-b' => undef});
local @ARGV = qw(-b);
is_deeply(docopt(doc => 'usage: prog [-ab]'), {'-a' => undef, '-b'=> True});
};
subtest 'test_issue_71_double_dash_is_not_a_valid_option_argument' => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Doit/Fork.pm view on Meta::CPAN
my $worker_pid = fork;
if (!defined $worker_pid) {
error "fork failed: $!";
} elsif ($worker_pid == 0) {
my $d = do {
local @ARGV = $dry_run ? '--dry-run' : ();
Doit->init;
};
$pipe_to_fork->reader;
$pipe_from_fork->writer;
$pipe_from_fork->autoflush(1);
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/40_gutenberg.t view on Meta::CPAN
sub newgut {
my @args = @_;
local @ARGV = (@COMMON_OPTS, @args);
return EBook::Gutenberg->init;
}
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;
}
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/deploy_config.t view on Meta::CPAN
is $output, '';
my $path = File::Spec->catfile( $pods_dir, 'first.pod.html' );
ok -f $path;
my $html = do { local (@ARGV, $/) = $path; <> };
like_string $html, qr/<h1 id="Unittest">Unittest/;
like_string $html, qr/<a href="http/;
like_string $html, qr/feature-addons/;
view all matches for this distribution
view release on metacpan or search on metacpan
t/07_run_two.t view on Meta::CPAN
=head1 Text - a test library for text output 200: Text !;
is( $debug, $check, 'debug' );
my $txt_check = "Text - a test library for text output\n Ein Absatz im POD.\n\n";
my $txt_content = do{ local( @ARGV, $/) = $txt->filename; <> };
is ( $txt_content, $txt_check, 'check generated text' );
sub debug{
$debug .= $_[0] . " ";
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/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;
src/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
lib/EB/IniWiz.pm view on Meta::CPAN
$req--;
my $ret;
undef $cfg;
EB->app_init( { app => $EekBoek::PACKAGE, %opts } );
require EB::Main;
local @ARGV = qw( --init );
$ret = EB::Main->run;
die(_T("Er is een probleem opgetreden. Raadplaag uw systeembeheerder.")."\n")
if $ret;
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
elsif (/^{(.+)}$/) {
eval $1;
next;
}
local @ARGV = shellwords($_);
my $cmd = shift @ARGV;
$cmd =~ tr/-/_/;
if ($shell{'aliases'}{$cmd}) {
$cmd = $shell{'aliases'}{$cmd};
if (ref $cmd) {
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/elive_lint_config view on Meta::CPAN
main(@ARGV) unless caller;
sub main {
local(@ARGV) = @_;
my $help;
(GetOptions(
'help|?' => \$help,
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
lib/Email/Fingerprint/App/EliminateDups.pm view on Meta::CPAN
sub _process_options :PRIVATE {
my ( $self, @args ) = @_;
# Fool Getopt::Long. Sigh.
local @ARGV = @args;
$self->_init;
$self->_die_usage if not GetOptions(
"dump" => \$dump{ident $self},
view all matches for this distribution
view release on metacpan or search on metacpan
# this is a wrapper for distro manipulation methods
#_______________________________________
sub admin {
my $edb = shift;
local @ARGV = @_;
my %sub_for_admin_command = (
addDistro => undef,
cloneDistro => undef,
updateDistro => undef,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Enbld/App.pm view on Meta::CPAN
}
sub parse_options {
my $self = shift;
local @ARGV;
push @ARGV, @_;
my $make_test;
my $force;
my $current;
view all matches for this distribution