view release on metacpan or search on metacpan
lib/App/ansiexpand.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
local @ARGV = map { utf8::is_utf8($_) ? $_ : decode('utf8', $_) } @_;
use Getopt::EX::Long qw(:DEFAULT ExConfigure Configure);
ExConfigure BASECLASS => [ __PACKAGE__, 'Getopt::EX' ];
Configure qw(bundling pass_through);
$app->getopt || pod2usage();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ansifold.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
local @ARGV = @_;
$app->options->params->doit;
return 0;
}
sub options {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/assh.pm view on Meta::CPAN
"$ENV{HOME}/.autossh_rc"
},
);
method _build_hosts {
$_ = do { local(@ARGV, $/) = $->ssh_config_file; <>; };
s/\s+/ /g;
my $ret = {};
while (m<Host\s(.+?)\sHostName\s(.+?)\sUser\s(.+?)\s>xg) {
$ret->{$1} = { NAME => $2, USER => $3 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/bk.pm view on Meta::CPAN
sub backup_files {
# make sure we don't clobber any callers variables
local @ARGV = @ARGV;
GetOptions( \%options, keys(%opts) ) || pod2usage( -verbose => 1 );
die("Version: $VERSION\n") if ( $options{version} );
pod2usage( -verbose => 1 ) if ( $options{'?'} || $options{help} );
pod2usage( -verbose => 2 ) if ( $options{HELP} || $options{man} );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cat/v.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
local @ARGV = splice @_;
$app->options->setup->doit;
return 0;
}
sub options {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/chot.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
@_ = map { utf8::is_utf8($_) ? $_ : decode('utf8', $_) } @_;
local @ARGV = splice @_;
use Getopt::EX::Long qw(GetOptions Configure ExConfigure);
ExConfigure BASECLASS => [ __PACKAGE__, "Getopt::EX" ];
Configure qw(bundling no_getopt_compat);
$app->getopt || pod2usage();
view all matches for this distribution
view release on metacpan or search on metacpan
script/cloudconvert view on Meta::CPAN
pod2usage(-verbose => 2) if ($opt{man});
## Read configuration
my $configfile = $opt{config} || 'cloudconvert.json';
if (-e $configfile) {
my $config = decode_json(do {local (@ARGV, $/) = $configfile; <>});
foreach (keys %$config) {
$opt{$_} = $config->{$_} unless exists $opt{$_}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/commons.pl view on Meta::CPAN
# Call the main subroutine and return its STDOUT and STDERR. Hack:
# ignore STDERR if it has a very specific string (it is done to avoid
# exit(0) in the tested script.
# -----------------------------------------------------------------
sub my_run {
local @ARGV = @_;
my ($stdout, $stderr);
eval {
capture { App::combinesheets->run() } \$stdout, \$stderr;
};
if ($@) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpangitify.pm view on Meta::CPAN
sprintf "%s <%s>", $cache->{$cpanid}->{name}, $email;
}
sub main ($, @args)
{
local @ARGV = @args;
no warnings 'redefine';
local *Git::Wrapper::RUN = \&_run_wrapper;
use warnings;
my %skip;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.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
t/constructors.t view on Meta::CPAN
use App::cpanoutdated::fresh;
sub canspawn {
my (@args) = @_;
my $reason = pop @args;
local @ARGV = @args;
is( exception { App::cpanoutdated::fresh->new_from_command() }, undef, $reason );
}
canspawn('no args');
canspawn( '--age=1h', 'age' );
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub parse_options {
my $self = shift;
local @ARGV = @{$self->{argv}};
push @ARGV, 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
lib/App/cpm/CLI.pm view on Meta::CPAN
sub _progress_default ($self) {
!WIN32 && !$self->maybe_ci && !$self->{verbose} && -t STDERR && terminal_width > 60 ? "tty" : "plain";
}
sub parse_options ($self, @argv) {
local @ARGV = @argv;
my ($mirror, @resolver, @feature, $top_level_phase, $top_level_relationship);
my $with_relationship_option = sub ($relationship) {
(
"with-$relationship",
sub (@) {
view all matches for this distribution
view release on metacpan or search on metacpan
sub execute {
my $ll = shift; # Local Lib
my $b = shift; # bin
if (-f "$ll/bin/$b") {
exec "perl", "-Mlocal::lib=$ll", "$ll/bin/$b", @ARGV;
} else {
print "ð Executable was found, but not installed correctly\n";
exit -1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/csv2sqlite.pm view on Meta::CPAN
sub getopt {
my ($class, $args) = @_;
my $opts = {};
{
local @ARGV = @$args;
my $p = Getopt::Long::Parser->new(
config => [qw(pass_through auto_help auto_version)],
);
$p->getoptions($opts,
'csv_files|csv-file|csvfile|csv=s@',
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Dategrep.pm view on Meta::CPAN
sub test_dategrep {
my ( $argv, $output, $name ) = @_;
no warnings 'once';
local $App::dategrep::app = 'dategrep';
local @ARGV = @$argv if $argv;
combined_is { App::dategrep->new->run } $output, $name;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/diff2vba.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
local @ARGV = map { utf8::is_utf8($_) ? $_ : decode('utf8', $_) } @_;
use Getopt::EX::Long qw(GetOptions Configure ExConfigure);
ExConfigure BASECLASS => [ __PACKAGE__, "Getopt::EX" ];
Configure qw(bundling no_getopt_compat);
$app->getopt || pod2usage();
view all matches for this distribution
view release on metacpan or search on metacpan
script/diffwc view on Meta::CPAN
require File::Which;
File::Which::which("diff") or die "diffwc: Can't find diff in PATH\n";
}
sub parse_cmdline {
local @ARGV = @ARGV;
# updated to diff 3.3 + color
GetOptions(
normal => sub {},
'brief|q' => sub {},
'report-identical-files|s' => sub {},
view all matches for this distribution
view release on metacpan or search on metacpan
t/03_dozo.t view on Meta::CPAN
open my $fh, '<', $bundled or die;
my $text = do { local $/; <$fh> };
close $fh;
like($text, qr/\A#!.*\n# getoptlong\.sh embedded by dozo --bundle\n(?s:.*)^gol_parse \(\)(?s:.*)^# end of getoptlong\.sh\n/m,
'getoptlong.sh is inserted after the first line');
my ($orig) = do { local(@ARGV, $/) = ($dozo); <> };
my $body = $orig =~ s/\A.*\n//r;
like($text, qr/\Q$body\E\z/, 'the rest of dozo follows unchanged');
# a PATH with bash but without getoptlong.sh
my $bin = "$dir/bin";
view all matches for this distribution
view release on metacpan or search on metacpan
code_before_instantiate_cmdline=print "";
code_after_end==head1 DESCRIPTION
code_after_end=
code_after_end=Sample output:
code_after_end=
code_after_end=# CODE: { local @INC = ("lib", @INC); local @ARGV = qw(-l --format text-pretty); require Perinci::CmdLine::Lite; Perinci::CmdLine::Lite->new(url=>"/App/errnos/list_errnos", exit=>0)->run; }
[InsertCodeOutput]
[@Author::PERLANCAR]
:version=0.41
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/genconf.pm view on Meta::CPAN
}
sub run {
my ( $self, @args ) = @_;
local @ARGV = @args;
GetOptions(
'v|verbose!' => sub { ++$self->{verbose} },
'V|version!' => \$self->{version},
'config-dir=s' => \$self->{config_dir},
) or $self->usage;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ghmulti.pm view on Meta::CPAN
App::ghmulti->run();
or
{
local @ARGV = @my_args;
App::ghmulti->run();
}
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/git/ship/perl.pm view on Meta::CPAN
$self->abort(
"Project built. Run 'git ship' again to post dist to CPAN and remote repostitory.");
}
unless ($self->config('next_version')) {
close ARGV;
local @ARGV = $changelog;
while (<>) {
/^$VERSION_RE\s*/ or next;
$self->config(next_version => $1);
last;
}
lib/App/git/ship/perl.pm view on Meta::CPAN
my $self = shift;
my $changelog = $self->config('changelog_filename');
my ($version, @message);
close ARGV; # reset <> iterator
local @ARGV = $changelog;
while (<>) {
last if @message and /^$VERSION_RE\s+/;
push @message, $_ if @message;
push @message, $_ and $version = $1 if /^$VERSION_RE\s+/;
}
lib/App/git/ship/perl.pm view on Meta::CPAN
warn "MANIFEST.SKIP included file '$file' not found - skipping\n";
return '';
}
@lines = ("#!start included $file\n");
local @ARGV = ($file);
push @lines, $_ while <>;
return join "", @lines, "#!end included $file\n";
}
sub _make {
lib/App/git/ship/perl.pm view on Meta::CPAN
$str = strftime $str, localtime;
setlocale LC_TIME, $loc;
return $str;
};
local @ARGV = $changelog;
local $^I = '';
while (<>) {
$self->config(next_version => $1)
if s/^$VERSION_RE\x20*(?:Not Released)?\x20*([\r\n]+)/{ $release_line->($1) . $2 }/e;
print; # print back to same file
lib/App/git/ship/perl.pm view on Meta::CPAN
sub _update_version_info {
my $self = shift;
my $version = $self->config('next_version')
or $self->abort('Internal error: Are you sure Changes has a timestamp?');
local @ARGV = ($self->config('main_module_path'));
local $^I = '';
my %r;
while (<>) {
$r{pod} ||= s/$VERSION_RE/$version/ if /^=head1 VERSION/ .. $r{pod} && /^=(cut|head1)/ || eof;
$r{var} ||= s/((?:our)?\s*\$VERSION)\s*=.*/$1 = '$version';/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/grepurl.pm view on Meta::CPAN
exit;
}
my %opts;
{
local @ARGV = @args;
getopts( 'bdv1' . 'aAiIjJ' . 'e:E:f:h:H:p:P:s:S:t:u:', \%opts );
}
# print STDERR Dumper( \%opts ); use Data::Dumper;
# print STDERR "Processed opts\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/grindperl.pm view on Meta::CPAN
if ( $self->opt->get_porting ) {
$self->vlog("Running 'make test_porting' with $test_jobs jobs");
$self->do_cmd("make -j $jobs test_porting")
or croak ("make test_porting failed");
}
elsif ( grep { /test_harness/ } do { local(@ARGV,$/) = "Makefile"; <>} ) {
$self->vlog("Running 'make test_harness' with $test_jobs jobs");
$self->do_cmd("make -j $jobs test_harness")
or croak ("make test_harness failed");
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/installdeps.pm view on Meta::CPAN
return;
}
sub _process
{
local (@ARGV) = @_;
my %opts;
getopts(Getopt::Config::FromPod->string, \%opts);
pod2usage(-verbose => 2) if exists $opts{h};
pod2usage(-msg => 'At least one argument MUST be specified', -verbose => 0, -exitval => 1) if ! @ARGV;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/karr/Dispatch.pm view on Meta::CPAN
# dispatch operates on the global @ARGV, exactly as bin/karr did inline:
# the two rewrites above and MooX::Cmd::new_with_cmd all read and write it.
# Localising it lets an embedding host call dispatch repeatedly, and lets
# bin/karr pass its own @ARGV in unchanged.
local @ARGV = @argv;
# The character/octet boundary (ticket #53). Everything the OS hands in is
# bytes; everything a command body sees is Perl characters. @ARGV comes in
# decoded, STDOUT and STDERR encode on the way out, and no command body
# encodes anything itself. STDIN stays raw on purpose -- every reader of it
lib/App/karr/Dispatch.pm view on Meta::CPAN
dispatch(@ARGV);
Runs one C<karr> invocation: sets up the character/octet boundary, records the
caller's argv, applies the empty-argument (#243) and dashed-option (#256)
rewrites, and calls C<< App::karr->new_with_cmd >> inside the central
exit-code handler (ADR 0002). Operates on a localised C<@ARGV>. Returns nothing
on success; on failure it prints the message to C<STDERR> and C<exit>s C<1> or
C<2> -- which, under an embedding host that overrides C<exit> (see
L</EMBEDDING>), becomes the host's exit-signal instead.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
my $elps = sprintf "%.6f" , tv_interval $start_time ;
say STDERR CYAN "Files processed : $num ; Shown above : $shown ; Elapsed seconds : $elps" ;
}
sub HELP_MESSAGE { # <-- - ãµãã³ãã³ããå¼ã°ãã¦ããã¨ãã¯ãã®ãã«ããå¼ã°ããã
local @ARGV = do { my ($x,@y) = 0 ; 1 while ( @y = caller $x++ )[ 0 ] eq "Getopt::Std" ; $y[1] } ;
Pod::Perldoc -> run ;
}
sub VERSION_MESSAGE { $ Getopt::Std::STANDARD_HELP_VERSION = 1 } # <- here?
view all matches for this distribution
view release on metacpan or search on metacpan
my $elps = sprintf "%.6f" , tv_interval $start_time ;
say STDERR CYAN "Files processed : $num ; Shown above : $shown ; Elapsed seconds : $elps" ;
}
sub HELP_MESSAGE { # <-- - ãµãã³ãã³ããå¼ã°ãã¦ããã¨ãã¯ãã®ãã«ããå¼ã°ããã
local @ARGV = do { my ($x,@y) = 0 ; 1 while ( @y = caller $x++ )[ 0 ] eq "Getopt::Std" ; $y[1] } ;
Pod::Perldoc -> run ;
}
sub VERSION_MESSAGE { $ Getopt::Std::STANDARD_HELP_VERSION = 1 } ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/lms.pm view on Meta::CPAN
} no Getopt::EX::Hashed;
sub run {
my $app = shift;
@_ = map { utf8::is_utf8($_) ? $_ : decode('utf8', $_) } @_;
local @ARGV = splice @_;
use Getopt::EX::Long qw(GetOptions Configure ExConfigure);
ExConfigure BASECLASS => [ __PACKAGE__, "Getopt::EX" ];
Configure qw(bundling no_getopt_compat);
$app->getopt || pod2usage();
view all matches for this distribution