view release on metacpan or search on metacpan
pl -n '...' *.pm
pl -nA '<*.pm>' -A '{ (stat)[7] < 1000 }' '...'
=item C<-a>
I<perl:> Autosplit mode with B<-n>/B<-p> (splits C<$_> into C<@F(IELD)>).
=item C<-bI<prog>>
Run program before reading a new file in B<-n>/B<-p>.
view all matches for this distribution
view release on metacpan or search on metacpan
0.06 2014-12-10 (PERLANCAR)
- No functional changes.
- Use new name of renamed/split module SHARYANTO::String::Util ->
String::PerlQuote.
0.05 2014-06-24 (SHARYANTO)
view all matches for this distribution
view release on metacpan or search on metacpan
pltest -n '...' *.pm
pltest -nA '<*.pm>' -A '{ (stat)[7] < 1000 }' '...'
=item C<-a>
I<perl:> Autosplit mode with B<-n>/B<-p> (splits C<$_> into C<@F(IELD)>).
=item C<-bI<prog>>
Run program before reading a new file in B<-n>/B<-p>.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/plx-packed view on Meta::CPAN
$fatpacked{"Parse/CPAN/Meta.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARSE_CPAN_META';
use 5.008001;use strict;package Parse::CPAN::Meta;our$VERSION='1.4414';use Exporter;use Carp 'croak';our@ISA=qw/Exporter/;our@EXPORT_OK=qw/Load LoadFile/;sub load_file {my ($class,$filename)=@_;my$meta=_slurp($filename);if ($filename =~ /\.ya?ml$...
PARSE_CPAN_META
$fatpacked{"Parse/PMFile.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARSE_PMFILE';
package Parse::PMFile;sub __clean_eval {eval $_[0]}use strict;use warnings;use Safe;use JSON::PP ();use Dumpvalue;use version ();use File::Spec ();our$VERSION='0.36';our$VERBOSE=0;our$ALLOW_DEV_VERSION=0;our$FORK=0;our$UNSAFE=$] < 5.010000 ? 1 : ...
read the file. It issued the following error: C< $err->{r} >},);$errors{$package}={open=>$err->{r},infile=>$pp->{infile},}}else {$pp->{version}="undef";$self->_verbose(1,qq{Parse::PMFile was not able to
parse the following line in that file: C< $err->{line} >
Note: the indexer is running in a Safe compartement and cannot
provide the full functionality of perl in the VERSION line. It
view all matches for this distribution
view release on metacpan or search on metacpan
}
}
# add path r from v to p.
sub grow {
my ($p, $v, $r) = @_;
my @d = split m|/|, $r;
my $f = pop @d;
for (@d) {
$p->{$_} = {%{$v->{$_}},
c => {}} if not $p->{$_};
$p = $p->{$_}{c}, $v = $v->{$_}{c};
my $r = shift;
if ($r =~ m{^/}) {
die c(RR, "Absolute path $r not prefixed by $s->{root}"), ".\n" unless 0 == index $r, $s->{root};
$r = substr $r, length $s->{root};
}
my ($d, @p) = (0, split m{/}, $r);
{subr => sub {
my $o = shift;
if ($o->{event} eq 'ent') {
my $u = $d >= @p || $o->{ent} eq $p[$d];
$d += 1 if $u and $o->{db}{c};
view all matches for this distribution
view release on metacpan or search on metacpan
}
}
FILE: foreach my $filename ( sort keys %{ content( \%Defaults ) } ) {
my @path = split m|\Q$Defaults{dir_sep}|, $filename;
my $file = catfile( $Defaults{directory}, @path );
$show_message->( "Checking for file [$filename]... " );
if( -e $file ) { $show_message->( "already exists\n" ); next FILE }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sdview.pm view on Meta::CPAN
if( -f( my $configpath = "$ENV{HOME}/.sdviewrc" ) ) {
App::sdview::Style->load_config( $configpath );
}
my %output_options = map {
map { m/^(.*?)=(.*)$/ ? ( $1 => $2 ) : ( $_ => !!1 ) } split m/,/, $_;
} $output_options->@*;
my $parser_class;
if( defined $format ) {
view all matches for this distribution
view release on metacpan or search on metacpan
script/sitelen-mute view on Meta::CPAN
# extracting title and description from a string containing newlines
sub cap_from_str {
my ($title, $desc) = @_;
return unless $title;
($title, $desc) = split m{\n+}, $title unless $desc;
return [cap_clean($title), cap_clean($desc)];
}
# extracting title and description from a properties hash reference
sub cap_from_props {
script/sitelen-mute view on Meta::CPAN
rename("$absFtmp.tmp", $absFtmp);
}
# generate main image
my @sfile = ($props{ImageWidth}, $props{ImageHeight});
my @simg = split m{\n+}, sys('convert', '-quiet', $absFtmp,
'-gamma', '0.454545',
'-geometry', "$maxfull[0]x$maxfull[1]>",
'-print', '%w\n%h',
'-gamma', '2.2',
'+profile', '!icc,*',
script/sitelen-mute view on Meta::CPAN
);
# face/center detection
my @center = (0.5, 0.5);
if ($facedet) {
my @f = split m{\n+}, sys("facedetect", "--best", "--center", catfile($absOut, $fimg));
for (@f) {
if (my @tmp = /(\d+) (\d+) (\d+) (\d+)/) {
@center = ($tmp[0] / $simg[0], $tmp[1] / $simg[1]);
last;
}
view all matches for this distribution
view release on metacpan or search on metacpan
push @opt, $_;
}
close $of;
}
}
foreach my $opt (split m/[:;]/ => $ENV{IVRC} || "") {
$opt =~ s{^[-/]?(\S+\s*=\s*\S.*)}{$1} or next;
push @opt, $opt;
}
while (@ARGV && $ARGV[0] =~ s{^[-/]?(\S+\s*=\s*\S.*)}{$1}) {
push @opt, shift @ARGV;
}
for (@opt) {
m/^(\S+)\s*=\s*(\S.*)/ or next;
my ($opt, $val) = (lc $1, $2);
$opt =~ m/^keys_/ and $val = [ split m/\s+/, $val ];
$Option{$opt} = $val;
}
}
foreach my $k (grep m/^keys_/ => keys %Option) {
s/^<?(.*?)>?$/<$1>/ for @{$Option{$k}};
$w->createText (5, 35,
-anchor => "nw",
-fill => $Option{exifinfocolor},
-font => $Option{smallfont},
-text => join ("\x{00b7}" =>
map { join " " => map { ucfirst lc $_ } split m/\s+/ => $_ }
grep m/\S/, map { $ei->{$_} // "" }
"Make", # Nikon
"Model", # Coolpix S9700
"DeviceType", # Cell Phone
"FileSource", # Digital Camera
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/tmclean.pm view on Meta::CPAN
die "failed to execute `tmutil listbackups`: $?\n";
}
# e.g. /Volumes/Time Machine Backup/Backups.backupdb/$machine/2018-01-07-033608
return grep {
chomp;
my @paths = split m!/!, $_;
my $backup_date = eval { Time::Piece->strptime($paths[-1], '%Y-%m-%d-%H%M%S') };
$backup_date && $self->before_tp > $backup_date;
} @backups;
}
lib/App/tmclean.pm view on Meta::CPAN
}->();
}
sub dev_name {
my $path = shift;
my @paths = split m!/!, $path;
join '/', @paths[0..2];
}
sub machine_name {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/wmiirc/Dwim.pm view on Meta::CPAN
system config("commands", "browser") . " '$action'&";
} elsif($action =~ m{^[\w.+-]+@}) {
$action =~ s/\@$//; # so I can type foo@ but it gets parsed properly
system config("commands", "mail") . " '$action'&";
} else {
my($host, $rest) = split m{/}, $action, 2;
if(exists $aliases{$host}) {
system config("commands", "browser") . " '" .
sprintf($aliases{$host}, uri_escape_utf8 "$rest@args") . "'&";
# TODO: Use IO::Async's lookup code for non-blocking here
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Earabic.pm view on Meta::CPAN
}
die __FILE__, ": Can't find string terminator anywhere before EOF\n";
}
}
# split m//
elsif (/\G \b (m) \b /oxgc) {
if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1,$3,$2,$4); } # m# # --> qr # #
else {
while (not /\G \z/oxgc) {
if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
view all matches for this distribution
view release on metacpan or search on metacpan
$stream->seek( $header->{next_header} );
my $fullname = _display_name($header);
$fullname = '' if $fullname eq '.';
my $has_path = ($fullname =~ m{/} && !_is_directory($header));
# l shows filename only (no path), + prefix if file has a path component
my $name = $has_path ? (split m{/}, $fullname)[-1] : $fullname;
$name .= '/' if _is_directory($header) && $name ne '' && $name !~ m{/$};
my $prefix = $has_path ? '+' : ' ';
printf "%s%s\n", $prefix, $name;
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
# Allow historic support for dashless bundled options
# tar cvf file.tar
# is valid (GNU) tar style
@ARGV && $ARGV[0] =~ m/^[DdcvzthxIC]+[fT]?$/ and
unshift @ARGV, map { "-$_" } split m// => shift @ARGV;
my $opts = {};
getopts('Ddcvzthxf:ICT:', $opts) or die usage();
### show the help message ###
die usage() if $opts->{h};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ask/Zenity.pm view on Meta::CPAN
sub file_selection {
my $self = shift;
my $text = readline( $self->_zenity( file_selection => @_ )->stdout );
chomp $text;
my @files = map path( $_ ), split m#[|]#, $text;
@files == 1 ? $files[0] : @files;
}
sub single_choice {
my ( $self, %o ) = @_;
lib/Ask/Zenity.pm view on Meta::CPAN
'--hide-column=2',
'--text', $o{text},
map { ( $subsequent++ ? 'FALSE' : 'TRUE' ), @$_ } @{ $o{choices} },
);
chomp( my $line = readline( $zen->stdout ) );
split m{\|}, $line;
} #/ sub _choice
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Atompub/MediaType.pm view on Meta::CPAN
);
sub new {
my($class, $arg) = @_;
my $media_type = $ATOM_TYPE{$arg} || $arg or return;
my($type, $subtype, $param) = split m{[/;]}, $media_type;
bless {
type => $type,
subtype => $subtype,
parameters => $param,
}, $class;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Attribute/Storage.pm view on Meta::CPAN
my ( $pkg, $ref, undef, $opts ) = @_;
my $attrs = _get_attr_hash( $ref, 1 );
my %type;
foreach ( split m/\s*,\s*/, $opts ) {
m/^(?:CODE|SCALAR|ARRAY|HASH)$/ and
( $type{lc $_} = 1 ), next;
m/^RAWDATA$/ and
( $type{raw} = 1 ), next;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/SASL/Perl/NTLM.pm view on Meta::CPAN
my $user = $self->_call('user');
# Check for the domain in the username
my $domain;
( $domain, $user ) = split m{ \\ }xms, $user
if index( $user, q{\\} ) > -1;
$self->{ntlm} = Authen::NTLM->new(
host => $self->host,
domain => $domain,
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Schema/RBAC/ResultSet/Page.pm view on Meta::CPAN
=cut
sub retrieve_pages_from_path {
my ( $self, $path, $get_all_pages ) = @_;
my $nodes = [ split m%/%, $path ];
$$nodes[0] = '/';
my $lasted_obj;
my (@not_found, @all_pages);
my $parent_id = 0; # page /
view all matches for this distribution
view release on metacpan or search on metacpan
t/02AutoSplit.t view on Meta::CPAN
# Assumption: no characters in arguments need escaping from the shell or perl
my $com = qq($runperl -e "use AutoSplit; autosplit (qw(@_))");
print "# command: $com\n";
# There may be a way to capture STDOUT without spawning a child process, but
# it's probably worthwhile spawning, as it ensures that nothing in AutoSplit
# can load functions from split modules into this perl.
my $output = `$com`;
warn "Exit status $? from running: >>$com<<" if $?;
return $output;
}
view all matches for this distribution
view release on metacpan or search on metacpan
my $s = uc $s;
my ($out) = $s . "\n" if $style;
my $token;
my @tokens = split m:/:, $s;
while ($token = shift @tokens) {
my ($element, $value) = ('', '');
if (($element, $value) = split / /, $token, 2) {
if (exists $abb_pirep{$element}) {
view all matches for this distribution
view release on metacpan or search on metacpan
doc/OLD_CHANGES.md view on Meta::CPAN
# Changes between 0.561 and 0.57:
* stylistic changes to symbolic constant stuff
* handled scope in `s///e` replacement code
* added unquote option for expanding `""` into concats, etc.
* split method and proto parts of `pp_entersub` into separate functions
* various minor cleanups
# Changes after 0.57:
* added parens in `\&foo` (patch by Albert Dvornik)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BATsh/Env.pm view on Meta::CPAN
}
# Ensure exactly one leading slash
$path = "/$path" unless $path =~ m{\A/};
# Collapse . and ..
my @segs;
for my $p (split m{/+}, $path) {
next if $p eq '' || $p eq '.';
if ($p eq '..') { pop @segs if @segs }
else { push @segs, $p }
}
$path = '/' . join('/', @segs);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BPM/Engine/Store/ResultRole/ActivityInstanceJoin.pm view on Meta::CPAN
if($status{active}) {
return 0;
}
# completed, is_split, blocked transition path
elsif($status{completed} && scalar(keys %status) == 1) {
# OR-split should be blocked, XOR split missed this transition by definition
if($upstream_act->is_or_split) {
my $blocked = 0;
foreach my $ai(@ai) {
$blocked++ if &$split_blocked($ai, $down_trans);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Beagle/Cmd/Command/publish.pm view on Meta::CPAN
my $self = shift;
my $link = shift or die 'need a link';
my $file = shift;
$file = $link unless defined $file;
$file =~ s!^/!!;
$file = encode( locale_fs => catfile( split m{/}, $file ) );
my $res = $app->(
{
'PATH_INFO' => $link,
'REQUEST_METHOD' => 'GET',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Beam/Wire.pm view on Meta::CPAN
my ( $self, $name, %override ) = @_;
; print STDERR "Get service: $name\n" if DEBUG;
if ( index( $name, q{/} ) != -1 ) {
my ( $container_name, $service_name ) = split m{/}, $name, 2;
my $container = $self->get( $container_name );
# This could be a Beam::Wire container, or it could be a plain hashref.
# If it's a hashref, we can automatically create a container and then use it.
if (ref $container eq 'HASH' && !(blessed $container and $container->isa('Beam::Wire'))) {
lib/Beam/Wire.pm view on Meta::CPAN
# This was named set() before I started using Perl::Critic, and will
# continue to be named set() now that I no longer use Perl::Critic
sub set {
my ( $self, $name, $service ) = @_;
if ( $name =~ q{/} ) {
my ( $container_name, $service_name ) = split m{/}, $name, 2;
return $self->get( $container_name )->set( $service_name, $service );
}
$self->services->{$name} = $service;
return;
}
lib/Beam/Wire.pm view on Meta::CPAN
#pod =cut
sub get_config {
my ( $self, $name ) = @_;
if ( $name =~ q{/} ) {
my ( $container_name, $service ) = split m{/}, $name, 2;
my %inner_config = %{ $self->get( $container_name )->get_config( $service ) };
# Fix relative references to prefix the container name
my ( $fixed_config ) = $self->fix_refs( $container_name, \%inner_config );
return $fixed_config;
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/PerlCritic/Critic/Annotation.pm view on Meta::CPAN
# Compose the specified modules into a regex alternation. Wrap each
# in a no-capturing group to permit "|" in the modules specification.
my @policy_name_patterns = grep { $_ ne $EMPTY }
split m{\s *[,\s] \s*}xms, $patterns_string;
my $re = join $PIPE, map {"(?:$_)"} @policy_name_patterns;
my @site_policy_names = Perl::Critic::PolicyFactory::site_policy_names();
@disabled_policy_names = grep {m/$re/ixms} @site_policy_names;
# It is possible that the Policy patterns listed in the annotation do not
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
exit print $usage unless $ARGV[0] ;
exit print $help if $ARGV[0] eq '--help' ;
exit print $usage unless -f $ARGV[0] ;
my @path = split m|/|, $ARGV[0] ;
exit print $usage unless $path[-1] eq 'db_config.h' ;
pop @path ;
pop @path ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ebig5.pm view on Meta::CPAN
}
die __FILE__, ": Can't find string terminator anywhere before EOF\n";
}
}
# split m//
elsif (/\G \b (m) \b /oxgc) {
if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1,$3,$2,$4); } # m# # --> qr # #
else {
while (not /\G \z/oxgc) {
if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ebig5hkscs.pm view on Meta::CPAN
}
die __FILE__, ": Can't find string terminator anywhere before EOF\n";
}
}
# split m//
elsif (/\G \b (m) \b /oxgc) {
if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1,$3,$2,$4); } # m# # --> qr # #
else {
while (not /\G \z/oxgc) {
if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
view all matches for this distribution