view release on metacpan or search on metacpan
lib/AnyEvent/Mac/Pasteboard.pm view on Meta::CPAN
use 5.008;
our $VERSION = '0.03';
use AnyEvent;
use Mac::Pasteboard ();
use Scalar::Util qw(looks_like_number);
use Time::HiRes;
our $DEFAULT_INTERVAL = 5;
#my $NATURAL_NUMBER_RE = qr/^[1-9][0-9]*$/;
lib/AnyEvent/Mac/Pasteboard.pm view on Meta::CPAN
my $on_error = delete $args{on_error} || sub { die @_; };
my $interval = delete $args{interval} || $DEFAULT_INTERVAL;
my $multibyte = delete $args{multibyte} || 1; # 1 is TRUE
if ( !defined $interval
or (ref $interval eq 'ARRAY' && @$interval != grep { looks_like_number($_) && $_ > 0 } @$interval )
or (!ref $interval && !looks_like_number($interval) ) ) {
$on_error->(qq(argument "interval" is natural number or arrayref contained its.));
}
my @interval = ref $interval eq 'ARRAY' ? @$interval : ($interval);
my $interval_idx = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
t/02client.t view on Meta::CPAN
my $complete_upload_response;
ok(
$complete_upload_response = $object->complete_multipart_upload( upload_id => $upload_id, part_numbers => [1,2], etags => \@etags),
"successful response for complete multipart upload"
);
#get the file and check that it looks like we expect
ok($object->exists, "object has now been created");
$tmp_fh = File::Temp->new();
$object->get_filename($tmp_fh->filename);
is( stat($tmp_fh->filename)->size, 6 * 1024 * 1024, "downloaded file has a size equivalent to the sum of it's parts");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Net/Curl/Const.pm view on Meta::CPAN
use utf8;
use warnings qw(all);
use Carp qw(carp);
use Net::Curl::Easy;
use Scalar::Util qw(looks_like_number);
our $VERSION = '0.049'; # VERSION
my (%const_info, %const_opt);
lib/AnyEvent/Net/Curl/Const.pm view on Meta::CPAN
return $const_opt{$name};
}
sub _curl_const {
my ($suffix => $key) = @_;
return $key if looks_like_number($key);
$key =~ s{^Net::Curl::Easy::}{}ix;
$key =~ y{-}{_};
$key =~ s{\W}{}gx;
$key = uc $key;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/RabbitMQ/Channel.pm view on Meta::CPAN
use strict;
use warnings;
use AnyEvent::RabbitMQ::LocalQueue;
use AnyEvent;
use Scalar::Util qw( looks_like_number weaken );
use Devel::GlobalDestruction;
use Carp qw(croak cluck);
use POSIX qw(ceil);
BEGIN { *Dumper = \&AnyEvent::RabbitMQ::Dumper }
lib/AnyEvent/RabbitMQ/Channel.pm view on Meta::CPAN
my $weight = delete $args->{weight} || 0;
# user-provided message headers must be strings. protect values that look like numbers.
my $headers = $args->{headers} || {};
my @prot = grep { my $v = $headers->{$_}; !ref($v) && looks_like_number($v) } keys %$headers;
if (@prot) {
$headers = {
%$headers,
map { $_ => Net::AMQP::Value::String->new($headers->{$_}) } @prot
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Redis/Federated.pm view on Meta::CPAN
=head2 CONFIGURATION
AnyEvent::Redis::Federated requires a configuration hash be passed
to it at instantiation time. The constructor will die() unless a
unless a 'config' option is passed to it. The configuration structure
looks like:
my $config = {
nodes => {
redis_1 => { address => 'db1:63790' },
redis_2 => { address => 'db1:63791' },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Redis/RipeRedis.pm view on Meta::CPAN
our $VERSION = '1.62';
use AnyEvent;
use AnyEvent::Handle;
use Encode qw( find_encoding is_utf8 );
use Scalar::Util qw( looks_like_number weaken );
use Digest::SHA qw( sha1_hex );
use Carp qw( croak );
my %ERROR_CODES;
lib/AnyEvent/Redis/RipeRedis.pm view on Meta::CPAN
if ( @_ ) {
my $seconds = shift;
if ( defined $seconds
&& ( !looks_like_number($seconds) || $seconds < 0 ) )
{
croak "\"$name\" must be a positive number";
}
$self->{$name} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/RipeRedis/Cluster.pm view on Meta::CPAN
use AnyEvent::RipeRedis;
use AnyEvent::RipeRedis::Error;
use AnyEvent::Socket;
use List::MoreUtils qw( bsearch );
use Scalar::Util qw( looks_like_number weaken );
use Carp qw( croak );
my %ERROR_CODES;
BEGIN {
lib/AnyEvent/RipeRedis/Cluster.pm view on Meta::CPAN
if (@_) {
my $seconds = shift;
if ( defined $seconds ) {
if ( !looks_like_number($seconds) || $seconds < 0 ) {
croak qq{"refresh_interval" must be a positive number};
}
$self->{refresh_interval} = $seconds;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/RipeRedis.pm view on Meta::CPAN
use AnyEvent::RipeRedis::Error;
use AnyEvent;
use AnyEvent::Handle;
use Scalar::Util qw( looks_like_number weaken );
use Digest::SHA qw( sha1_hex );
use Carp qw( croak );
my %ERROR_CODES;
lib/AnyEvent/RipeRedis.pm view on Meta::CPAN
if (@_) {
my $seconds = shift;
if ( defined $seconds
&& ( !looks_like_number($seconds) || $seconds < 0 ) )
{
croak qq{"$name" must be a positive number};
}
$self->{$name} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/HTTP/Spark.pm view on Meta::CPAN
use JSON qw(to_json from_json);
use HTTP::Request::Common qw(POST);
use Ref::Util qw(is_plain_arrayref is_plain_hashref);
use URI::Escape qw(uri_escape_utf8);
use namespace::clean;
use Scalar::Util qw(looks_like_number);
use AnyEvent;
BEGIN {
no namespace::clean;
with 'HTTP::MultiGet::Role','Log::LogMethods','AnyEvent::SparkBot::SharedRole';
lib/AnyEvent/HTTP/Spark.pm view on Meta::CPAN
if($self->is_blocking) {
$wrap=sub {
my ($self,$id,$result,undef,$response)=@_;
return $cb->(@_) if $result or !($response->code==429 and $count-- >0);
my $timeout=looks_like_number($response->header('Retry-After')) ? $response->header('Retry-After') : $self->retryTimeout;
$self->log_warn("Request: $id recived a 429 response, will retry in $timeout seconds");
if($count>0) {
my $next_id=$self->queue_request($request,sub {
lib/AnyEvent/HTTP/Spark.pm view on Meta::CPAN
};
} else {
$wrap=sub {
my ($self,$id,$result,undef,$response)=@_;
return $cb->(@_) if $result || !(($response->code==429 || $response->code==404) && $count-- >0);
my $timeout=looks_like_number($response->header('Retry-After')) ? $response->header('Retry-After') : $self->retryTimeout;
$self->log_warn("Request: $id recived a 429 response, will retry in $timeout seconds");
if($count>0) {
my $ae;
$ae=AnyEvent->timer(after=>$timeout,cb=>sub {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Stomper.pm view on Meta::CPAN
use AnyEvent::Stomper::Frame;
use AnyEvent::Stomper::Error;
use AnyEvent;
use AnyEvent::Handle;
use Scalar::Util qw( looks_like_number weaken );
use List::Util qw( max );
use List::MoreUtils qw( bsearch_index );
use Carp qw( croak );
my %ERROR_CODES;
lib/AnyEvent/Stomper.pm view on Meta::CPAN
if (@_) {
my $seconds = shift;
if ( defined $seconds
&& ( !looks_like_number($seconds) || $seconds < 0 ) )
{
croak qq{"$name" must be a positive number};
}
$self->{$name} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/external-process.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 15;
use AnyEvent::Subprocess;
use Scalar::Util qw(looks_like_number);
sub tests {
my $proc = shift;
ok $proc;
t/external-process.t view on Meta::CPAN
$run->delegate('stderr')->handle->on_read( sub { warn @_; warn $_[0]->rbuf; $got_error++ } );
$run->delegate('stdout')->handle->push_read( line => sub {
my ($h, $data) = @_;
ok length $data > 9, 'got some value from `date`';
ok looks_like_number $data, 'data looks like number';
});
my $done = $condvar->recv;
is $done->exit_value, 0, 'exited with value 0';
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
WebDriver.pm view on Meta::CPAN
As above, but returns an arrayref of all found element objects.
=item $element = $wd->find_element_from_element ($element, $locator_strategy, $selector)
Like C<find_element>, but looks only inside the specified C<$element>.
=item $elements = $wd->find_elements_from_element ($element, $locator_strategy, $selector)
Like C<find_elements>, but looks only inside the specified C<$element>.
my $head = $wd->find_element ("tag name" => "head");
my $links = $wd->find_elements_from_element ($head, "tag name", "link");
=item $element = $wd->get_active_element
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/WebService/Tracks/Todo.pm view on Meta::CPAN
use strict;
use warnings;
use parent 'AnyEvent::WebService::Tracks::Resource';
use Carp qw(croak);
use Scalar::Util qw(looks_like_number);
use namespace::clean;
our $VERSION = '0.02';
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Ext/MUC/Room.pm view on Meta::CPAN
$self->{me}
}
=item B<get_user_jid ($jid)>
This method looks whether a user with the JID C<$jid> exists
in the room. That means whether the node and domain part of the
JID match the rooms node and domain part, and the resource part of the
JID matches a joined nick.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.010001||p
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.010001||p
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution