view release on metacpan or search on metacpan
Generator.pm view on Meta::CPAN
'-pix_fmt', 'yuv420p',
$out_path);
$ffmpeg->options(@command_options);
$ffmpeg->exec;
if ($ffmpeg->stderr) {
my @stderr = split m/\n/ms, $ffmpeg->stderr;
my $command = join $SPACE, @command_options;
err "Error with command 'ffmpeg $command'.",
map { ('STDERR', $_) } @stderr;
}
if ($self->{'verbose'}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/W3C/SOAP/Utils.pm view on Meta::CPAN
map { lc $_ }
map { s/\W/_/gxms; $_ } ## no critic
split /[.]/xms, $uri->host;
$module .= join '::',
map { s/\W/_/gxms; $_ } ## no critic
split m{/}xms, $uri->path;
return $module;
}
# other URI's are just made safe as a perl module name.
$ns =~ s{://}{::}xms;
view all matches for this distribution
view release on metacpan or search on metacpan
t/WARC-Record-Logical-Block.t view on Meta::CPAN
'read mcd line straddling boundary');
note_handle_state $xh;
## line: multi-char delimiter at segment boundary
is(scalar <$xh>, 'klmnABCD', 'read mcd line at segment boundary');
note_handle_state $xh;
## line: split multi-char delimiter straddling boundary
is(scalar <$xh>, 'opqrABCD',
'read mcd line with delimiter straddling boundary');
note_handle_state $xh;
## line: split multi-char delimiter with prefixes
is(scalar <$xh>, 'stuvABABCABCD',
'read mcd line split with prefixes');
note_handle_state $xh;
## line: split multi-char delimiter with false prefixes across segments
is(scalar <$xh>, 'wxyzABCABEABABCD',
'read mcd line split with false prefixes across segments');
note_handle_state $xh;
## line: multi-char delimiter to EOF without delimiter
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Autosite.pm view on Meta::CPAN
=cut
sub abs_path_n {
my $absPath = shift;
return $absPath if $absPath =~ m{^/$};
my @elems = split m{/}, $absPath;
my $ptr = 1;
while($ptr <= $#elems)
{
if($elems[$ptr] eq q{})
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Bebo/API.pm view on Meta::CPAN
or croak "Cannot open $self->{'config'}";
while (<$config>) {
carp "Config line: $_" if $self->{'debug'};
chomp;
my ( $key, $val ) = split m/=/xms, $_, 2;
next if !$key;
carp "Key/Val pair: $key -> $val" if $self->{'debug'};
for ( $key, $val ) {
s/\A\s+//xms;
s/\s+\Z//xms;
view all matches for this distribution
view release on metacpan or search on metacpan
result_no_crlf => 1, #0-with crlf, 1-no crlf
space_leading_remove => 1, #remove leading spaces
space_leading_max => 20, #max leading spaces
space_inner_remove => 1, #remove inner spaces
space_inner_min_words => 5, #minimal length of word with inner spaces
text_paragraph_type => 'br', #type of paragraph split methods
# br one br as end of paragraph
# brbr two br as end of paragraph
# cr one cr as end of paragraph
# crcr two cr as end of paragraph
# crandspace one cr and followed with space as end of paragraph
$_[0]->decode_entity($_[1]);
$_[1]=~s/\n+/ /sg; # CRLF as space
$_[0]->normalize_paragraph_1($_[1]);
$_[1]=~s/ +/ /sg; #remove extra spaces
#remove ending space or wordsplit mark
my $p1=$_[0]->{patterns}->{mark_wordsplit};
$p1=~s/(?:^\[|\]$)//sg;
$p1="[".$p1." ]";
$_[1]=~s/$p1+$//os;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Domain/Registry/VeriSign.pm view on Meta::CPAN
my($key, $val) = ($1, $2);
$val =~ s/ ?/ /g;
$val =~ s/^\s+//;
$val =~ s/\s+$//;
$val =~ s/\n+/\n/g;
$data->{lc($key)} = $val =~ m/\n/ ? [ split m/\n/ , $val ] : $val;
}
return $data;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/web-app.pl view on Meta::CPAN
if ( exists $ENV{'QUERY_STRING'} ) {
($uid) = $ENV{'QUERY_STRING'} =~ /\bid=([^&]+)/;
}
if ( my $s = $action_map{$action} ) {
my @args = split m[(?<!\\)/],
( $facebook->query->path_info =~ m[^/(?:\w+)/(.*)] )[0];
@args = () unless @args;
$uid ||= $facebook->session_uid;
$s->( $facebook, $uid, @args );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Firecrawl.pm view on Meta::CPAN
=item * C<< $fc->foo(%args) >> â convenience: builds, fires via L<LWP::UserAgent>, parses
=back
The split makes the module trivial to use with any async framework; see
L<Net::Async::Firecrawl> for the L<IO::Async> integration.
=head1 ERROR HANDLING
All failures throw a L<WWW::Firecrawl::Error> object (stringifies to its
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Google/Contacts/Base.pm view on Meta::CPAN
my $name = $attr->name;
try {
$self->$name( $data->{ $attr->xml_key } );
}
catch {
my @err = split m{\n}, $_;
print "\nERROR - Failed to set attribute\n";
print "-------------------------------\n";
print "Attribute: " . $name . "\n";
print "Value: " . Dumper $data->{ $attr->xml_key };
print "Error: " . $err[0] . "\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Mechanize/Chrome.pm view on Meta::CPAN
=cut
sub sendkeys_future( $self, %options ) {
$options{ keys } ||= [ map +{ type => 'char', text => $_ },
split m//, $options{ string }
];
my $f = Future->done(1);
for my $key (@{ $options{ keys }}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Mixi/OO/TableListPage.pm view on Meta::CPAN
$this->cache->{indecies}->{title} = 0;
$this->cache->{indecies}->{navi} = 1;
$this->cache->{indecies}->{body} = 2;
}
split main tables to some parts.
=cut
sub _split_tables {
my ($this, $part) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/MobileCarrierJP/DoCoMo/UserAgent.pm view on Meta::CPAN
$col = $col->as_HTML;
next unless $col =~ /DoCoMo/;
$col = (
grep {/DoCoMo/}
split m[(?: |<br\s*/>|\r|\n)]i, $col
)[0]; # XXX: è¤æ°ããã¨ãã¯ä¸çªæåã®ããã©ã¦ã¶
$col =~ s/Â *ï¼.+//;
$col =~ s/<[^><]+>//g; # remove tags
$col =~ s/( .*)$//;
$col =~ s/^\s*//;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Postini.pm view on Meta::CPAN
assert($url, 'URL defined');
my $subject = $p->get_trimmed_text();
assert($subject, 'Subject defined');
my $uri = (split m!\?!, $url)[1];
assert($uri, 'URI defined');
my %params;
foreach my $pair (split /&/, $uri) {
view all matches for this distribution
view release on metacpan or search on metacpan
$book_hr->{'publisher'}
= $book_hr->{'author_publisher'}->[1];
$book_hr->{'publisher'} =~ s/\N{U+00A0}$//ms;
delete $book_hr->{'author_publisher'};
($book_hr->{'old_price'}, $book_hr->{'price'})
= split m/\s*\*\s*/ms, $book_hr->{'price'};
push @{$self->{'cache'}}, $book_hr;
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/USF/Directory.pm view on Meta::CPAN
# Delete all keys with blank content
delete @row{grep { $row{$_} =~ m{\A \p{IsSpace}* \z}msx } keys %row};
if (exists $row{given_name}) {
# Split on vertical whitespace
my @given_names = split m{[\r\n]+}msx, $row{given_name};
# The first two given names are as follows
my ($first_name, $middle_name) = @given_names;
if (defined $first_name) {
lib/WWW/USF/Directory.pm view on Meta::CPAN
}
}
if (exists $row{affiliation}) {
# There could be zero or more affiliations seperated by vertical space
my @affiliations = split m{\s*[\r\n]+\s*}msx, delete $row{affiliation};
# Change the affiliation to objects
foreach my $affiliation (@affiliations) {
$affiliation = WWW::USF::Directory::Entry::Affiliation->new($affiliation);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Yahoo/Movies.pm view on Meta::CPAN
my $caption = $p->get_text;
SWITCH: for($caption) {
/^Genres/ && do {
$t = $p->get_trimmed_text('/tr');
$self->genres([split m#/#, $t]);
last SWITCH; };
/^Running Time/ && do {
$t = $p->get_trimmed_text('/tr');
$self->runtime($self->_parse_runtime($t));
last SWITCH; };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Weather/GHCN/App/CacheUtil.pm view on Meta::CPAN
);
my %opt;
# create a list of option key names by stripping the various adornments
my @keys = map { (split m{ [!+=:|] }xms)[0] } grep { !ref } @options;
# initialize all possible options to undef
@opt{ @keys } = ( undef ) x @keys;
GetOptionsFromArray($argv_aref, \%opt, @options)
or pod2usage(2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Weather/Underground/StationHistory.pm view on Meta::CPAN
;
} # end generate_single_day_station_history_url()
sub strip_garbage_from_station_history {
my $original_contents = shift;
my @original_lines = split m/ [\r\n]+ /xms, $original_contents;
my $resulting_contents = $EMPTY_STRING;
foreach my $original_line (@original_lines) {
$original_line =~ s/ $RE{balanced}{-parens => '<>'} //xmsg;
$original_line =~ s/ $RE{ws}{crop} //xmsg;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Web/Components/ConfigLoader.pm view on Meta::CPAN
my $file = $attr->{config_file}
// ns_environment($attr->{appclass}, 'config')
// $name;
my $extensions = $attr->{config_extensions} // 'json yaml';
return map { "${file}.${_}" } split m{ \s }mx, $extensions;
}
sub _home_indicator_dirs () {
return qw( var );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Web/ComposableRequest.pm view on Meta::CPAN
$attr->{params} = $query if $query;
for my $arg (grep { defined && length } @args) {
if (blessed $arg) { $attr->{upload} = $arg }
else {
push @{ $attr->{args} //= [] }, map { trim $_ } split m{ / }mx, $arg;
}
}
return $request_class->new($self->buildargs->($self, $attr));
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/HTTP/Server.pm view on Meta::CPAN
);
$self->{out_headers} = { %default_headers };
my $req = $self->{request}->[1];
$req =~ s#^/##;
my @args = map { uri_unescape $_ } split m#/#, $req;
my $func = shift @args;
$func = "index" unless defined $func and length $func;
my $body;
eval {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WebDyne/Request/PSGI.pm view on Meta::CPAN
# Get from URI and location
#
my $uri=$r{'uri'} || $ENV{'PATH_INFO'} || $ENV{'SCRIPT_NAME'};
debug("uri: $uri");
$fn=File::Spec->catfile($dn, split m{/+}, $uri); #/
debug("fn: $fn from dn: $dn, uri: $uri");
}
lib/WebDyne/Request/PSGI.pm view on Meta::CPAN
}
else {
# Otherwise append to existing path
#
$fn=File::Spec->catfile($fn, split m{/+}, $document_default); #/
}
}
else {
# Not .psp file, do not want
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WebServer/DirIndex.pm view on Meta::CPAN
my $url = $dir_url . $basename;
my $is_dir = -d $file;
my @stat = stat $file;
$url = join '/', map { uri_escape($_) } split m{/}, $url;
if ($is_dir) {
$basename .= '/';
$url .= '/';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WebService/S3/Tiny.pm view on Meta::CPAN
return $creq;
}
sub _normalize_path {
my @old_parts = split m(/), $_[0], -1;
my @new_parts;
for ( 0 .. $#old_parts ) {
my $part = $old_parts[$_];
view all matches for this distribution
view release on metacpan or search on metacpan
samples/packing.pl view on Meta::CPAN
my @struct_output = ();
for my $member (@{$struct}) {
push @struct_decl, qq{\t$member;};
my ($type, $name) = split m{\s+}, $member, 2;
$type =~ s{^\s*}{};
$name =~ s{\s*$}{};
push @struct_output,
qq{\tp = ($ptr_type) &ts.$name;},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Win32/Resources.pm view on Meta::CPAN
{ local $/; $param->{data} = <F>; }
close(F);
}
if (defined($param->{path})) {
($param->{type}, $param->{name}, $param->{language}) = split m#/#, $param->{path};
}
$param->{type} = _get_rt($param->{type});
return undef unless ($param->{name});
view all matches for this distribution
view release on metacpan or search on metacpan
PMVersionInfo.pm view on Meta::CPAN
$file->{path} =~ s/^\Q$self->{strip_path}\E//i;
$file->{path} =~ s/\.[^.]*$// if defined $self->{extension};
$file->{path} =~ s|\\|/|g;
# Build the heirachy
my $path = $root;
foreach my $part (split m|/|,$file->{path}){
$path .= $part.'/';
$_ = $Registry->{ $path };
$Registry->{ $path } = {} if not defined $_;
}
# Make the keys from all the values in %{$file}, except $path
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Win32/VBScript.pm view on Meta::CPAN
my $dat_sha1 = sha1_hex($dat_text);
my $dat_class = "InlineWin32COM.WSC\\_$dat_sha1.wsc";
my %dat_func;
for (split m{\n}xms, $dat_text) {
if (m{\A \s* (?: function | sub) \s+ (\w+) (?: \z | \W)}xmsi) {
$dat_func{$1} = undef;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1250.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