view release on metacpan or search on metacpan
lib/File/RDir.pm view on Meta::CPAN
$root =~ s{\\}'/'xmsg;
my @PList;
if (ref($opt) eq 'HASH' and defined($opt->{'prune'})) {
for (split m{;}xms, $opt->{'prune'}) {
my ($item, $mod) = m{\A ([^:]*) : ([A-Z]*)\z}xmsi ? ($1, $2) : ($_, '');
my $rstring = '';
for my $frag (split m{([\*\?])}xms, $item) {
if ($frag eq '*') {
$rstring .= '.*?';
}
elsif ($frag eq '?') {
$rstring .= '.';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Rsync/Mirror/Recentfile.pm view on Meta::CPAN
my($self,$path) = @_;
unless (defined $path) {
# seems like a degenerated case
return $self->localroot;
}
my @p = split m|/|, $path;
File::Spec->catfile($self->localroot,@p);
}
=head2 (void) $obj->lock
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Slurp/Tree.pm view on Meta::CPAN
next if $file eq $top;
(my $rel = $file) =~ s{^\Q$top\E/}{};
next unless $rel; # it's /
#print "top:$top file:$file rel:$rel\n";
my @elems = split m{/}, $rel;
# go to the top of the tree
my $node = $tree;
# and walk along the path
while (my $elem = shift @elems) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/System/Object.pm view on Meta::CPAN
my $abspath = $self->normalize_path($path);
if ($self->is_root) {
my $result = $self;
my @components = split m#/#, $path;
for my $component (@components) {
$self->is_container && ($result = $result->child($component))
or return undef;
}
lib/File/System/Object.pm view on Meta::CPAN
# Fix us up to an absolute path
$path = $self->path."/$path";
}
# Break into components
my @components = split m#/+#, $path;
@components = ('', '') unless @components;
unshift @components, '' unless @components > 1;
for (my $i = 1; $i < @components;) {
if ($components[$i] eq '.') {
lib/File/System/Object.pm view on Meta::CPAN
my $path = shift;
if ($path eq '/') {
return '/';
} else {
my @components = split m{/}, $path;
return pop @components;
}
}
=item $dirname = $obj-E<gt>dirname_of_path($normalized_path)
lib/File/System/Object.pm view on Meta::CPAN
my $path = shift;
if ($path eq '/') {
return '/';
} else {
my @components = split m{/}, $path;
pop @components;
push @components, '' if @components == 1;
return join '/', @components;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Wildcard.pm view on Meta::CPAN
return ( $path, $abs, $follow ) if !defined($path) || ref $path;
$path =~ s!//!/!g;
$abs = $path =~ s!^/!!;
$path =~ s!^\./!/!;
my @out = split m(/), $path, -1; #/ (syntax highlighting)
shift @out if $out[0] eq '';
pop @out if $out[-1] eq '';
( \@out, $abs, $follow );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Filesys/Virtual/DAAP.pm view on Meta::CPAN
}
sub _get_leaf {
my $self = shift;
my $path = $self->_resolve_path( shift );
my (undef, @chunks) = split m{/}, $path;
my $walk = $self->_vfs;
$walk = $walk->{$_} for @chunks;
return $walk;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FilmAffinity/Movie.pm view on Meta::CPAN
};
private_method p_cleanPerson => sub {
my $value = shift;
my @persons = split m/,/xms, $value;
@persons = map {trim (p_removeTextBetweenParenthesis($_) )} @persons;
return \@persons;
};
private_method p_cleanGenre => sub {
my ($value, $field) = @_;
my $pos = $field eq 'genre' ? 0 : 1;
my @list = split m/[|]/xms, $value;
if ( defined $list[$pos]){
my @genres = trim ( split m/[.]/xms, $list[$pos] );
return \@genres;
}
return;
};
private_method p_cleanStudio => sub {
my ($value, $field) = @_;
my $pos = $field eq 'studio' ? 0 : 1;
my @list = split m/[.]\sProducer: /xms, $value;
my @studio = ();
if (not defined $list[$pos]){
return;
} else {
@studio = trim ( split m{ / }xms, $list[$pos] );
return \@studio;
}
};
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/Bank/ID/BCA.pm view on Meta::CPAN
$tx->{is_next} = 1;
} elsif ($e->{date} =~ /PEND/) {
$tx->{date} = $stmt->{end_date};
$tx->{is_pending} = 1;
} else {
my ($day, $mon) = split m!/!, $e->{date};
my $last_nonpend_date = DateTime->new(
year => ($mon < $stmt->{start_date}->month ?
$stmt->{end_date}->year :
$stmt->{start_date}->year),
month => $mon,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/Bank/ID/BPRKS.pm view on Meta::CPAN
### $tx->{is_next} = 1;
###} elsif ($e->{date} =~ /PEND/) {
### $tx->{date} = $stmt->{end_date};
### $tx->{is_pending} = 1;
###} else {
my ($day, $mon, $year) = split m!/!, $e->{date};
my $last_nonpend_date = DateTime->new(
year => $year,
month => $mon,
day => $day);
$tx->{date} = $last_nonpend_date;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/Bank/Postbank_de/APIv1.pm view on Meta::CPAN
sub diagnoseCertificateError( $self, $error=$@ ) {
my( $found, $re ) = ($error =~ m#'(.+?)' !~ /\Q(?^:\E(.+?)/ at #)
or die "$error"; # reraise
warn $found;
warn $re;
my @found_parts = split m!/!, $found;
my @re_parts = split m!/!, $re;
for my $i (0..$#re_parts ) {
if( $found_parts[ $i ] =~ $re_parts[ $i ]) {
warn "'$found_parts[ $i ]' =~ /$re_parts[ $i ]/, OK\n";
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/Quote/DWS.pm view on Meta::CPAN
my $processor = scraper {
process '//*[@id="FundsFinder_ResultTable"]/tr', 'row[]' => scraper {
process 'td', 'col[]' => scraper {
process 'a', 'name' => 'TEXT';
process ':not(a)', 'other' => ['HTML', sub{[split m|<br */>|, $_]}];
};
};
};
my $data = $processor->scrape($reply);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/mzxml-scan view on Meta::CPAN
die "don't know what to do with <binaryDataArrayList> of size != 2 (read: $n)" unless $n == 2;
my $chunk_no = 0;
my @key = qw/mz intensity/;
my $table;
foreach my $chunk ( split m{</binaryDataArray>\s*}, $tail) {
if ( $chunk =~ m{^(.*<binaryDataArray.+<binary>)(.*)(</binary>.*)$}s ) {
my ($head, $data, $tail) = ($1, $2, $3);
my ($size) = ( $head =~ /<cvParam.+name="(\d\d-bit)/ );
view all matches for this distribution
view release on metacpan or search on metacpan
t/05_split.t view on Meta::CPAN
#===============================================================================
#
# DESCRIPTION: Test split mod
#
# AUTHOR: Aliaksandr P. Zahatski, <zahatski@gmail.com>
#===============================================================================
#$Id$
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/ttftable view on Meta::CPAN
{
push @newtag, map {s/ //og; $_} sort grep {length($_) == 4} keys %{$f};
}
else
{
# Otherwise split more generously (spaces, comma, colon, semicolon, pipe) and
# also expand magic words.
s/\bgraphite\b/ Silf Feat Gloc Glat Sill Sile /oi;
s/\bvolt\b/ TSIV TSID TSIP TSIS /oi;
s/\bopentype\b/ GDEF GSUB GPOS /oi;
s/\baat\b/ mort morx feat /oi;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Forks/Super/LazyEval.pm view on Meta::CPAN
}
sub array {
my $this = shift;
if (!$this->{array}) {
my $eol = quotemeta($/);
$this->{array} = [ split m{(?<=$eol)}, $this->{result}->_fetch ];
}
$this->{array};
}
sub hash {
my $this = shift;
if (!$this->{hash}) {
my $eol = quotemeta($/);
$this->{hash} = { split m{(?<=$eol)}, $this->{result}->_fetch };
}
$this->{hash};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FormValidator/Nested/ProfileProvider/YAML.pm view on Meta::CPAN
sub get_profile_data {
my $self = shift;
my $key = shift;
my @path = split m{/}, $key;
$path[-1] .= $EXT;
my $file = Path::Class::File->new($self->dir, @path);
if ( !-f $file ) {
return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
open CONF, "<$path/conf" or die $!;
while(<CONF>){
next if m|^#|;
chomp;
my ($key, $value) = split m|:|;
$self->{$key} = $value;
}
close CONF;
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Froody/Request/CGI.pm view on Meta::CPAN
->filename($filename)
->client_filename($client_filename)
->mime_type($type);
} else {
# split multi-values params into a listref
my @vals = split("\0",$vars{$_});
$vars{$_} = \@vals if (@vals > 1);
# decopde params from unicode
$vars{$_} = Encode::decode_utf8( $vars{$_}, 1 );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FP/Path.pm view on Meta::CPAN
*import = constructorexporter new_from_string => "path";
sub new_from_string {
@_ == 2 or fp_croak_arity 2;
my ($class, $str) = @_;
my @p = split m{/+}, $str;
shift @p if (@p and $p[0] eq "");
$class->new(
array_to_list_reverse(\@p),
scalar $str =~ m{/$}s,
scalar $str =~ m{^/}s
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Fuse/PDF/ContentFS.pm view on Meta::CPAN
my ($self, $path) = @_;
my $nsymlinks = 0;
my @dirs = ($self->_root);
my @path = split m{/}xms, $path;
for (my $i = 0; $i < @path; ++$i) { ##no critic(ProhibitCStyleForLoops)
my $entry = $path[$i];
next if q{} eq $entry;
lib/Fuse/PDF/ContentFS.pm view on Meta::CPAN
my $linkpath = $f->{content};
# cannot leave the filesystem; must be relative
return EACCESS() if $linkpath =~ m{\A /}xms;
splice @path, $i + 1, 0, split m{/}xms, $linkpath;
}
}
push @dirs, $f;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/IO.pm view on Meta::CPAN
shift;
my @prefer;
my %veto;
foreach ( split m/,/, $ENV{PERL_FUTURE_IO_IMPL} // "" ) {
if( s/^-// ) {
$veto{$_} = 1;
}
else {
push @prefer, $_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Workflow/Pipeline.pm view on Meta::CPAN
return $dom->at('div[id="main"]')->text;
});
# A detached (out-of-process/thread) stage; e.g. some silly CPU-intensive task
$pipeline->append_stage_detached( sub ($text) {
my $iter = Algorithm::Permute->new([ split m/\s+/, $text ]);
my $best; my $bestscore;
while(my @words = $iter->next) {
my $str = join "\0", @words;
my $score = md5sum( $str );
lib/Future/Workflow/Pipeline.pm view on Meta::CPAN
});
# A synchronous output
$pipeline->set_output_sync( sub ($best) {
print "MD5 minimized sort order is:\n";
print " $_\n" for split m/\0/, $best;
});
# 4: Now start it running on some input values
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Egbk.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/Bio/Graphics/Browser2/Render/HTML/TrackListing/Categories.pm view on Meta::CPAN
# For each category, create the appropriately-nested node. "My Tracks" node positions comes from the track's config file.
my $usertracks = $render->user_tracks;
foreach my $category (@categories) {
next if $seenit{$category}++;
my $id = "${category}_section";
my $category_title = (split m/(?<!\\):/,$category)[-1];
$category_title =~ s!($_)!<span style="background-color:yellow">$1</span>!gi foreach @hilite;
my $file_id;
if ($category eq $render->translate('REGION') && !$render->setting('region segment')) {
lib/Bio/Graphics/Browser2/Render/HTML/TrackListing/Categories.pm view on Meta::CPAN
my $sort_index = 0;
for my $category (@$categories) {
my $cont = $contents->{$category} || '';
my @parts = map {s/\\//g; $_} split m/(?<!\\):/,$category;
$sort_order{$_} = $sort_index++ foreach @parts;
my $i = $category_hash;
# we need to add phony __next__ and __contents__ keys to avoid
view all matches for this distribution
view release on metacpan or search on metacpan
$self->{program} = $config{program};
if ( ! $self->{program} ){
# it is possible to get the url as "demo.pl??foo=bar"
my $url = $self->{cgi}->can('self_url') ? $self->{cgi}->self_url
: $self->{cgi}->url;
($self->{program}, my @jp) = split m{[?]}xms, $url;
}
my %options = $self->all_options;
my %styles = $self->all_styles;
my @optz = keys %options;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GSM/Gnokii/Tk/GSMTree.pm view on Meta::CPAN
my $fulldir = _cleanpath ($val);
my $parent = "/";
my @dirs = ("");#$parent);
for (split m{/+} => $fulldir) {
length or next;
push @dirs, $_;
my $dir = _cleanpath (join "/" => @dirs);
$dir eq "/" and next;
$w->infoExists ($dir) or $w->add_to_tree ($dir, $_, $parent);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gaim/Log/Parser.pm view on Meta::CPAN
if($line =~ /$line_match_with_time/) {
$time = $1;
$msg = $2;
} elsif($line =~ /$line_match_with_date_and_time/) {
$date = $1;
($month, $day, $year) = split m#/#, $date;
$time = $2;
$msg = $3;
} elsif($line =~ /$line_match_with_euro_date_and_time/) {
$date = $1;
($day, $month, $year) = split m#\.#, $date;
$time = $2;
$msg = $3;
} elsif($line =~ /$line_match_with_iso_date_and_time/) {
$date = $1;
($year, $month, $day) = split m#-#, $date;
$time = $2;
$msg = $3;
} else {
while(defined $line and $line !~ /$line_match/) {
chomp $line;
view all matches for this distribution
view release on metacpan or search on metacpan
share/hex-describe-schroeder-table.txt view on Meta::CPAN
;spellbooks
1,<h1 id="appendix-a">Appendix A: Spellbooks</h1><p>These spells are from the <a href="https://alexschroeder.ch/pdfs/spellcasters/">Spellcasters</a> project.<div style="font-size: smaller; column-count: 2">[halberds & helmets: spellbooks]</div>
# Use make hex-describe in the spellcasters working directory to generate the following
;halberds & helmets: spellbooks
1,Each paragraph begins with the **spell name** followed by the spell circle in parenthesis (1â5), also known as the *spell level*.<p id="air-blast">**Air blast** (1) turns the exhalation of the caster into a blast of air that extinguishes candles ...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Axmud/Obj/File.pm view on Meta::CPAN
$self->convert($client->connectHistoryFlag),
'# Use page up (etc) to scroll in textviews',
$self->convert($client->useScrollKeysFlag),
'# Page up (etc) doesn\'t scroll the entire page length',
$self->convert($client->smoothScrollKeysFlag),
'# Page up (etc) auto-engages split mode',
$self->convert($client->autoSplitKeysFlag),
'# Use tab/cursor keys to auto-complete commands',
$self->convert($client->useCompleteKeysFlag),
'# Use tab to switch between sessions',
$self->convert($client->useSwitchKeysFlag),
view all matches for this distribution
view release on metacpan or search on metacpan
server/net.c_tmp view on Meta::CPAN
conn_terminated(fd, "NUL byte before newline");
return;
}
if (prio) {
// prio e.g. in game; we split messages because p and ! must be treated specially (see game::process_msg_prio)
process_msg_prio(fd, ptr, eol - ptr + 1);
len -= eol - ptr + 1;
if (len == 0) {
prio_processed = 1;
break;
view all matches for this distribution