view release on metacpan or search on metacpan
lib/IO/Prompter.pm view on Meta::CPAN
# Not a special style...
return $style if ref $style || $style !~ m{/};
# A slash means yes/no echoes...
my ($yes, $no) = split m{/}, $style;
return sub{ /y/i ? $yes : $no };
}
sub _decode_echostyle {
my $style = shift;
# Not a special style...
return $style if ref $style || $style !~ m{/};
# A slash means yes/no styles...
my ($yes, $no) = split m{/}, $style;
return sub{ /y/i ? $yes : $no };
}
sub _decode_style {
# No special prompt styles (yet)...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/DNS.pm view on Meta::CPAN
return eval { [$self->resolver->query($name, "TXT")->answer]->[0]->txtdata };
} : do {
my %args = $self->resolver_args;
my $nameservers = $args{nameservers};
if ($nameservers) {
$nameservers = [split m/ /, $nameservers] if !ref $nameservers;
}
$nameservers ||= [""];
warn "WARNING: Unable to find Net::DNS so reverting to nslookup (slow spawn) method ...\n";
# Return a closure containing the lexically scoped $nameservers variable.
sub {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Termios.pm view on Meta::CPAN
sub set_mode
{
my $self = shift;
my ( $modestr ) = @_;
my ( $baud, $csize, $parity, $stop ) = split m/,/, $modestr;
my $attrs = $self->getattr;
$attrs->setbaud ( $baud ) if defined $baud;
$attrs->setcsize ( $csize ) if defined $csize;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IPC/PerlSSH.pm view on Meta::CPAN
return wantarray ? @retargs : $retargs[0];
}
elsif( $ret eq "DIED" ) {
my ( $message ) = @retargs;
if( $message =~ m/^While compiling code:.* at \(eval \d+\) line (\d+)/ ) {
$message .= " ==> " . (split m/\n/, $code)[$1 - 1] . "\n";
}
die "Remote host threw an exception:\n$message";
}
elsif( $ret eq "CLOSED" ) {
die "Remote connection closed\n";
lib/IPC/PerlSSH.pm view on Meta::CPAN
}
elsif( $ret eq "DIED" ) {
my ( $message ) = @retargs;
if( $message =~ m/^While compiling code for (\S+):.* at \(eval \d+\) line (\d+)/ ) {
my $code = $funcs{$1};
$message .= " ==> " . (split m/\n/, $code)[$2 - 1] . "\n";
}
die "Remote host threw an exception:\n$message";
}
elsif( $ret eq "CLOSED" ) {
die "Remote connection closed\n";
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
return $_[1];
};
}
{
map { my ($pk, $vr) = split m/\s/; build_requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Test::Most
_END_
map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
IPC::Open3
IO::Select
Any::Moose
_END_
}
if (-e 'inc/.author') {
my $all_from = join '/', 'lib', split m/-/, name . '.pm';
`perldoc -tF $all_from > README` if ! -e 'README' || (stat $all_from)[9] > (stat 'README')[9];
}
auto_install;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IPC/SRLock.pm view on Meta::CPAN
$conf and $conf->can( 'lock_attributes' )
and merge_attributes $attr, $conf->lock_attributes,
[ keys %{ $conf->lock_attributes } ];
$attr->{name} //= lc join '_', split m{ :: }mx, __PACKAGE__, -1;
my $type = delete $attr->{type}; $attr = { _implementation_attr => $attr };
$type and $type !~ m{ \A ([a-zA-Z0-9\:\+]+) \z }mx
and die "Type ${type} tainted";
view all matches for this distribution
view release on metacpan or search on metacpan
t/04_irc_modechange.t view on Meta::CPAN
my @splitm = $long->split_mode_set(4);
cmp_ok(@splitm, '==', 2, 'split_mode_set spawned 2 sets' )
or diag explain \@splitm;
cmp_ok($splitm[0]->mode_string, 'eq', '+o-o+o-o avenj avenj Joah Joah',
'split mode_string 1 looks ok'
);
cmp_ok($splitm[1]->mode_string, 'eq', '+vv-b Gilded miniCruzer some@mask',
'split mode_string 2 looks ok'
);
my $cloned = $long->clone;
isa_ok( $cloned, 'IRC::Mode::Set', 'clone() returned obj' );
is_deeply( $cloned->mode_array, $expected_long,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IkiWiki/Plugin/syntax/base.pm view on Meta::CPAN
}
sub _split_htmlized {
my $self = shift;
return split m{\n}xms, $self->htmlized();
}
sub _join_html_lines {
my ($self,@lines) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
- ajpeg2gif: convert ajpegs to gifs with mogrify+gifsicle
0.01 2016-11-02
- left alpha stage, feature lock
- added missing .desktop and .xml files
- makeajpeg: new --split mode allows to disassemble a
monolithic AJPEG to individual JPEG frame files
- gif2ajpeg: die on error from convert
- new ajpeg2gif offers the reverse operation of
gif2ajpeg, via mogrify and gifsicle
- new ajpegtran crops a whole AJPEG animation
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Image/ExifTool/Geotag.pm view on Meta::CPAN
} elsif ($format eq 'Bramor') {
# 1 0015 18.723675 50.672752 149 169.31 22/04/2015 07:06:55 169.31 8.88 28.07 ypr
# ? index latitude longitude alt track date time dir pitch roll
my @parts = split ' ', $_;
next unless @parts == 12 and $parts[11] eq 'ypr';
my @d = split m{/}, $parts[6]; # date (dd/mm/YYYY)
my @t = split m{:}, $parts[7]; # time (HH:MM:SS)
next unless @d == 3 and @t == 3;
@$fix{qw(lat lon alt track dir pitch roll)} = @parts[2,3,4,5,8,9,10];
# (add the seconds afterwards in case some models have decimal seconds)
$time = Time::Local::timegm(0,$t[1],$t[0],$d[0],$d[1]-1,$d[2]) + $t[2];
# set necessary flags for extra available information
view all matches for this distribution
view release on metacpan or search on metacpan
webp-src/ChangeLog view on Meta::CPAN
16c46e8 autoconf/make: cosmetics: break long lines
ab22a07 configure: add helper macro to define --with-*
c17699b configure: add libtiff test
0e09732 Merge "cwebp: fix crash with yuv input + lossless"
88a510f Merge "fix big-endian VP8LWriteBits"
da99e3b Merge "Makefile.vc: split mux into separate lib"
7bda392 cwebp: fix crash with yuv input + lossless
f56a369 fix big-endian VP8LWriteBits
54169d6 Merge "cwebp: name InputFileFormat members consistently"
e2feefa Makefile.vc: split mux into separate lib
27caa5a Merge "cwebp: add basic TIFF support"
d8921dd cwebp: name InputFileFormat members consistently
6f76d24 cwebp: add basic TIFF support
4691407 Merge changes If39ab7f5,I3658b5ae
cca7c7b Fixed nit: 10 -> 10.f
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Installer/cpanm.pm 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 : 0;...
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
t/lib/JMAP/Tester/MockServer.pm view on Meta::CPAN
: index($path, '/jmap/upload/') == 0 ? _handle_upload_req($req)
: _error(404);
}
sub _handle_download_req ($req) {
my (undef, undef, undef, $accountid, $blob_id, $name) = split m{/}, $req->path_info;
return [
200,
[
'Content-Type' => $req->parameters->{type},
'Content-Disposition' => qq{attachment; filename="$name"},
t/lib/JMAP/Tester/MockServer.pm view on Meta::CPAN
[ "The blob you requested was $blob_id for $accountid." ],
];
}
sub _handle_upload_req ($req) {
my (undef, undef, undef, $account_id) = split m{/}, $req->path_info;
my $content = $req->raw_body;
my $length = length $content;
my $blob_id = substr($content, 0, 1) . q{-} . $length; # Whatever.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JS/YUI/Loader/Manifest.pm view on Meta::CPAN
return @{ $self->{schedule} };
}
sub parse {
my $self = shift;
my @_collection = map { split m/\n/ } @_;
my @collection;
for (@_collection) {
next if m/^\s*#/;
next if m/^\s*<!--/;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
all_from 'lib/JS/jQuery/Loader.pm';
build_requires 'Test::More';
build_requires 'Directory::Scratch';
for (split m/\n/, <<_END_) {
Carp::Clan::Share
File::Copy
HTML::Declare
LWP::UserAgent
Moose
Path::Abstract
Path::Class
URI
_END_
my ($module, $version) = split m/\s+/, $_;
requires $module, $version;
}
auto_install;
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/JSON/Schema/Modern/Utilities.pm view on Meta::CPAN
}
# splits a json pointer apart into its path segments
sub unjsonp {
carp q{argument to unjsonp should be '' or start with '/'} if length($_[0]) and substr($_[0],0,1) ne '/';
return map s!~0!~!gr =~ s!~1!/!gr, split m!/!, $_[0];
}
sub jsonp_get ($data, $pointer) {
Mojo::JSON::Pointer->new($data)->get($pointer);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSON/SchemaValidator.pm view on Meta::CPAN
return 1;
},
ipv4 => sub {
my ($ipv4) = @_;
my @parts = split m/\./, $ipv4;
return unless @parts > 0 && @parts < 5;
for my $part (@parts) {
return unless $part =~ m/^[0-9]+$/ && $part >= 0 && $part < 256;
lib/JSON/SchemaValidator.pm view on Meta::CPAN
return 1;
},
ipv6 => sub {
my ($ipv6) = @_;
my @parts = split m/\:/, $ipv6;
return unless @parts > 0 && @parts < 9;
for my $part (@parts) {
next if $part eq '';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSON/Structure/InstanceValidator.pm view on Meta::CPAN
# Handle # prefix
$ref =~ s/^#//;
return $root if $ref eq '' || $ref eq '/';
my @segments = split m{/}, $ref;
shift @segments if @segments && $segments[0] eq '';
my $current = $root;
for my $segment (@segments) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Prepare.pm view on Meta::CPAN
my $self = shift;
my $file = shift;
my $dir = dirname $file;
my $content = $self->read_file( $file );
my @lines = split m{\n}, $content;
my $minified = '';
foreach my $line ( @lines ) {
#
$line =~ m{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/V8x/TestMoreish.pm view on Meta::CPAN
$self->eval( JavaScript::V8x::TestMoreish::JS->TestMoreish );
$self->eval( <<'_END_' );
if (! TestMoreish)
var TestMoreish = _TestMoreish;
_END_
$self->eval( join "\n", map { "function $_() { TestMoreish.$_.apply( TestMoreish, arguments ) }" } split m/\n+/, <<_END_ );
diag
areEqual
areNotEqual
areSame
areNotSame
view all matches for this distribution
view release on metacpan or search on metacpan
tests/t/string.t.js view on Meta::CPAN
[% SET a = '1' -%]
[% a.defined ? '1' : '0' %]
--- output
1
=== Test split method
--- jemplate
string_split.html
[% SET a = 'aaa12aaa34aaa' -%]
[% a.split('\\\d\\\d').join(' ') %]
[% SET a = '1aaa2aaa3aaa4' -%]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ekoi8r.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/Ekoi8u.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/Ekps9566.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/Eksc5601.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
push @got, $token->get_text;
}
Test::More::is_deeply( \@got, $expected, "analyze_field: $message" );
}
# Verify an Analyzer's transform, transform_text, and split methods.
sub test_analyzer {
my ( $analyzer, $source, $expected, $message ) = @_;
my $inversion = KinoSearch::Analysis::Inversion->new( text => $source );
$inversion = $analyzer->transform($inversion);
view all matches for this distribution
view release on metacpan or search on metacpan
dlib/Multilingual/Code.pm view on Meta::CPAN
}
$var{name}
}gexms;
$py_params =~ s{,$}{};
my ($defs, $execs) = (q{}, q{});
for my $construct (split m{^(?=\S)}xm, $block) {
if ($construct =~ /\A\s*def\b/) { $defs .= $construct; }
else { $execs .= $construct; }
}
$execs =~ s{^}{ }gm;
return ($defs =~ /\S/ ? qq[ use Inline Python => q{$defs}; ] : q{})
view all matches for this distribution
view release on metacpan or search on metacpan
buildlib/KinoSearch/Test/TestUtils.pm view on Meta::CPAN
my $frowny = $not_a_smiley;
utf8::upgrade($frowny);
return ( $smiley, $not_a_smiley, $frowny );
}
# Verify an Analyzer's transform, transform_text, and split methods.
sub test_analyzer {
my ( $analyzer, $source, $expected, $message ) = @_;
my $inversion = KinoSearch::Analysis::Inversion->new( text => $source );
$inversion = $analyzer->transform($inversion);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Konstrukt/Lib.pm view on Meta::CPAN
$Konstrukt::Debug->debug_message("Installing DBI backend for plugin $package") if Konstrukt::Debug::INFO;
#extract relevant sections
my $sections = $self->extract_data_sections($package);
#only take the relevant sections and split multiple queries into single queries
my @queries = split /;/, ($sections->{'dbi: create'} || '');
#create tables
foreach my $query (@queries) {
next if $query =~ /^\s*$/; #skip "empty" queries
view all matches for this distribution