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
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my $version;
{
local $^W;
$ExtUtils::MakeMaker::VERSION = eval $ExtUtils::MakeMaker::VERSION;
}
$version_from = File::Spec->catfile(split m{/}, "lib/Games/Mahjongg/Solver/deBondt/FFI.pm");
unshift @INC, "lib";
my $version = MM->parse_version($version_from); # MM is in MakeMaker
if ($trial) {
$version .= "-TRIAL";
if ($trial > 1) {
view all matches for this distribution
view release on metacpan or search on metacpan
some special caveats and setup required, this is covered as a separate topic.
=item Split attributes
A "split" attribute is available only to datatypes I<number> and I<int>. An
attribute that is split maintains two separate values for the attribute, a
"real value" and a "current value" (or simply the "value"). An attribute that
is split in this way has the following properties:
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
MapGen/Editor.pm view on Meta::CPAN
type => "text",
desc => "The %-chance of a door occuring between a room tile and a corridor tile where there is already an opening. The percentages are listed as a four touple: door-chance, secret, stuck, locked (e.g., 95,2,25,50 means there's a 95% c...
name => 'open_room_corridor_door_percent',
default => '95, 2, 25, 50',
disable => { generator_plugins => sub { (grep {$_ eq "BasicDoors"} @{$_[0]}) ? 0:1 } },
convert => sub { my @a = split m/\D+/, $_[0]; { door=>$a[0], secret=>$a[1], stuck=>$a[2], locked=>$a[3] } },
trevnoc => sub { join(", ", @{$_[0]}{qw( door secret stuck locked )}) },
matches => [sub { (grep {$_ >= 0 and $_ <= 100} $_[0] =~ m/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)$/) == 4 }],
fixes => [sub { $_[0] =~ s/[^\d,\s]+//g }], },
{ mnemonic => "Closed Room-Corridor: ",
type => "text",
desc => "The %-chance of a door occuring between a room tile and a corridor tile where there isn't an opening. The percentages are listed as a four touple: door-chance, secret, stuck, locked.",
name => 'closed_room_corridor_door_percent',
default => '5, 95, 10, 30',
disable => { generator_plugins => sub { (grep {$_ eq "BasicDoors"} @{$_[0]}) ? 0:1 } },
convert => sub { my @a = split m/\D+/, $_[0]; { door=>$a[0], secret=>$a[1], stuck=>$a[2], locked=>$a[3] } },
trevnoc => sub { join(", ", @{$_[0]}{qw( door secret stuck locked )}) },
matches => [sub { (grep {$_ >= 0 and $_ <= 100} $_[0] =~ m/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)$/) == 4 }],
fixes => [sub { $_[0] =~ s/[^\d,\s]+//g }], },
{ mnemonic => "Open Corridor-Corridor: ",
type => "text",
desc => "The %-chance of a door occuring between a corridor tile and a corridor tile where there is already an opening. The percentages are listed as a four touple: door-chance, secret, stuck, locked.",
name => 'open_corridor_corridor_door_percent',
default => '1, 10, 25, 50',
disable => { generator_plugins => sub { (grep {$_ eq "BasicDoors"} @{$_[0]}) ? 0:1 } },
convert => sub { my @a = split m/\D+/, $_[0]; { door=>$a[0], secret=>$a[1], stuck=>$a[2], locked=>$a[3] } },
trevnoc => sub { join(", ", @{$_[0]}{qw( door secret stuck locked )}) },
matches => [sub { (grep {$_ >= 0 and $_ <= 100} $_[0] =~ m/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)$/) == 4 }],
fixes => [sub { $_[0] =~ s/[^\d,\s]+//g }], },
{ mnemonic => "Closed Corridor-Corridor: ",
type => "text",
desc => "The %-chance of a door occuring between a corridor tile and a corridor tile where there isn't an opening. The percentages are listed as a four touple: door-chance, secret, stuck, locked.",
name => 'closed_corridor_corridor_door_percent',
default => '1, 95, 10, 30',
disable => { generator_plugins => sub { (grep {$_ eq "BasicDoors"} @{$_[0]}) ? 0:1 } },
convert => sub { my @a = split m/\D+/, $_[0]; { door=>$a[0], secret=>$a[1], stuck=>$a[2], locked=>$a[3] } },
trevnoc => sub { join(", ", @{$_[0]}{qw( door secret stuck locked )}) },
matches => [sub { (grep {$_ >= 0 and $_ <= 100} $_[0] =~ m/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)$/) == 4 }],
fixes => [sub { $_[0] =~ s/[^\d,\s]+//g }], },
{ mnemonic => "Max Span: ",
view all matches for this distribution
view release on metacpan or search on metacpan
Modified tests to have better coverage over code
Removed from setProperty tag check on compose _tagCheck handles it
3/30/08
Integrated isType, and type(move|point|stone) methods
Added edit.t test (removal and split methods)
Fixed Bugs when during test writing
3/31/08
Added inherit.t
Fixed some bugs related to inherited tags
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-create.t view on Meta::CPAN
for ( glob("$_/*"), glob("$_/.*") ) {
next if m{/\.\.?$};
if ( -d ) {
push(@_,$_) unless m{/CVS$};
} elsif ( m{\.pm$} ) {
($_) = join("::", map { split m{/+}, $_ } m{^lib/(.*)\.pm});
push(@res, $_);
} else {
print;
};
};
view all matches for this distribution