view release on metacpan or search on metacpan
lib/Android/Build.pm view on Meta::CPAN
sdkmanager 'platforms;android-25' 'build-tools;25.0.3
END
}
sub getPlatform # Get and validate the SDK Platform folder
{my ($a) = @_;
my $f = $a->platformX;
$f or confess <<END.getInstructions;
"platform" parameter required - it should be the name of the folder containing
lib/Android/Build.pm view on Meta::CPAN
$f
END
$f
}
sub getBuildTools # Get and validate the SDK Platform build-tools folder
{my ($a) = @_;
my $f = $a->buildToolsX;
$f or confess <<END.getInstructions;
"buildTools" parameter required - it should be the name of the folder
lib/Android/Build.pm view on Meta::CPAN
$f
END
$f
}
sub getPlatformTools # Get and validate the SDK Platform tools folder
{my ($a) = @_;
my $f = $a->platformToolsX;
$f or confess <<END.getInstructions;
"platformTools" parameter required - it should be the name of the folder
lib/Android/Build.pm view on Meta::CPAN
my $a = filePath($p, qw(android.jar));
-e $a or confess "Cannot find android.jar via file:\n$a\n";
$a
}
sub getPackage # Get and validate the package name for this app
{my ($a) = @_;
my $d = $a->package;
$d or confess <<END =~ s/\n/ /gsr;
"package" parameter required - it should be the value used on the package
statement in the Activity for this app
view all matches for this distribution
view release on metacpan or search on metacpan
xt/live/370-get_current_location.t view on Meta::CPAN
ok(exists($provres->{$k}), 'Android::ElectricSheep::Automator->dump_current_location()'." : result contains key '$k' for provider '$aprov'.") or BAIL_OUT(perl2dump($res)."no it does not, see above");
ok(defined($provres->{$k}), 'Android::ElectricSheep::Automator->dump_current_location()'." : result contains key '$k' and it is defined, for provider '${aprov}'.") or BAIL_OUT(perl2dump($res)."no it does not, see above");
# some providers may be 'null' meaning no available
# for those we will have an entry but lat/lon will be <na>
next if $provres->{$k} eq '<na>';
ok($provres->{$k}=~/\d+\.\d+/, 'Android::ElectricSheep::Automator->dump_current_location()'." : result contains key '$k' and it validates as a real number, for provider '${aprov}'.") or BAIL_OUT(perl2dump($res)."no it does not, see above");
}
for my $k (qw/provider/){
ok(exists($provres->{$k}), 'Android::ElectricSheep::Automator->dump_current_location()'." : result contains key '$k' for provider '$aprov'.") or BAIL_OUT(perl2dump($res)."no it does not, see above");
ok(defined($provres->{$k}), 'Android::ElectricSheep::Automator->dump_current_location()'." : result contains key '$k' and it is defined, for provider '${aprov}'.") or BAIL_OUT(perl2dump($res)."no it does not, see above");
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Anki/Import.pm view on Meta::CPAN
# pad data with a blank line to make it easier to process
push @lines, '';
# do the stuff we came here for
validate_src_file(); logd(\@notes);
generate_importable_files($pd);
# print a success message
unless ($args->{'quiet'}) {
set_log_level('info');
lib/Anki/Import.pm view on Meta::CPAN
# fin
}
# functions for first pass parsing of source data
sub validate_src_file {
logi('Validating source file');
# throw error if file is empty
logf('Source data file is empty.') if !$lines[0];
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
src/ppport.h view on Meta::CPAN
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
valid_utf8_to_uvchr|||
valid_utf8_to_uvuni||5.015009|
validate_proto|||
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Antispam/Toolkit/Role/BerkeleyDB.pm view on Meta::CPAN
die 'The ' . __PACKAGE__ . ' role requires a BerkeleyDB linked against Berkeley DB 4.4+'
unless $BerkeleyDB::db_version >= 4.4;
}
use Moose::Role;
use MooseX::Params::Validate qw( validated_list );
with 'Antispam::Toolkit::Role::Database';
has database => (
is => 'ro',
lib/Antispam/Toolkit/Role/BerkeleyDB.pm view on Meta::CPAN
->iso8601();
}
sub build {
my $class = shift;
my ( $file, $database, $update ) = validated_list(
\@_,
file => {
isa => DataFile,
coerce => 1,
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Any/Daemon/FCGI.pod view on Meta::CPAN
=head1 DESCRIPTION
The Fast CGI protocol connects a generic front-end web-server (like
Apache or NGinx) with an backe-end daemon. The communication reuses
connections. The front-end server validates and throttles requests to
the back-end daemon. This module is the base for such back-end daemon.
This module extends the network side of a socket. During L<accept()|Any::Daemon::FCGI/"Actions">,
each incoming connection will create a new
L<Any::Daemon::FCGI::ClientConn|Any::Daemon::FCGI::ClientConn> object which handles the requests.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Any/Renderer/Template.pm view on Meta::CPAN
Any::Renderer::Template renders any Perl data structure passed to it with
Any::Template. The Any::Template backend used depends on the 'format' parameter passed to
the object constructor.
Templates expressed as filenames are cached using a package-level in-memory cache with Cache::AgainstFile.
This will stat the file to validate the cache before using the cached object, so if the template is updated,
this will be immediately picked up by all processes holding a cached copy.
=head1 FORMATS
All the formats supported by Any::Template. Try this to find out what's available on your system:
view all matches for this distribution
view release on metacpan or search on metacpan
MYMETA.yml
README
t/00_compile.t
t/01_simple.t
t/02_trim.t
t/03_validate.t
t/04_eof.t
xt/live.t
xt/pod.t
xt/pod_coverage.t
xt/pod_spell.t
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
- fix cookie format documentation.
2.24 Thu Aug 30 03:23:03 CEST 2018
- bring cookie management more in line with RFC 6265; implement idn
matching for cookie domains.
- update cookie_jar version to 2, invalidate existing cookie jars.
- preserve original cookie domain attribute.
- also expire old cookie jars in cookie parser, just in case.
- further improve relative redirection code.
- comment out code that tried to detect possible bugs with persistent
connection caching, but since it never triggered, it's probably
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
The required C<on_response> code reference is executed with the raw response
data and headers as parameters.
=head1 CAVEATS
Following the optimistic nature of InfluxDB this modules does not validate any
arguments. Also quoting and escaping special characters is to be done by the
user of this library.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
verbose => 1,
);
Complete list of options: L<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html>
If C<CURLOPT_POSTFIELDS> is a C<HashRef> or looks like a valid JSON (validates via L<JSON>),
it is encoded as UTF-8 and C<Content-Type: application/json; charset=utf-8> header is set automatically.
=head2 getinfo(VAR_NAME [, VAR_NAME])
Extends L<Net::Curl::Easy> C<getinfo()> so it is able to get several variables at once;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
use Carp qw( croak carp );
use AnyEvent;
use AnyEvent::Pg::Pool;
use Future;
use Params::Validate qw( validate_with );
use fields qw(
pool
local
);
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
my $class = shift;
my $params = {@_};
my $self = fields::new( $class );
$params = $self->_validate_new( $params );
my $pool = {};
foreach my $server ( @{ $params->{servers} } ) {
my $dbh = AnyEvent::Pg::Pool->new(
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
$self->{local} = $params->{local};
return $self;
}
sub _validate_new {
my __PACKAGE__ $self = shift;
my $params = shift;
$params = validate_with(
params => $params,
spec => {
servers => 1,
local => 1,
},
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
sub selectall_arrayref {
my __PACKAGE__ $self = shift;
my $params = {@_};
$params = $self->_validate_selectall_arrayref( $params );
my @futures = ();
my @pool = ();
if ( defined $params->{server_id} ) {
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
} );
return;
}
sub _validate_selectall_arrayref {
my __PACKAGE__ $self = shift;
my $params = shift;
$params = validate_with(
params => $params,
spec => {
query => 1,
args => 0,
cb => 1,
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
sub selectrow_hashref {
my __PACKAGE__ $self = shift;
my $params = {@_};
$params = $self->_validate_selectrow_hashref( $params );
my $future = $self->_get_future_push_query(
query => $params->{query},
args => $params->{args},
server => $self->{pool}{ $params->{server_id} },
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
} );
return;
}
sub _validate_selectrow_hashref {
my __PACKAGE__ $self = shift;
my $params = shift;
$params = validate_with(
params => $params,
spec => {
query => 1,
args => 0,
cb => 1,
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
sub selectrow_array {
my __PACKAGE__ $self = shift;
my $params = {@_};
$params = $self->_validate_selectrow_array( $params );
my $future = $self->_get_future_push_query(
query => $params->{query},
args => $params->{args},
server => $self->{pool}{ $params->{server_id} },
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
} );
return;
}
sub _validate_selectrow_array {
my __PACKAGE__ $self = shift;
my $params = shift;
$params = validate_with(
params => $params,
spec => {
query => 1,
args => 0,
cb => 1,
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
sub do {
my __PACKAGE__ $self = shift;
my $params = {@_};
$params = $self->_validate_do( $params );
my $future = $self->_get_future_push_query(
query => $params->{query},
args => $params->{args},
server => $self->{pool}{ $params->{server_id} },
lib/AnyEvent/Pg/Pool/Multiserver.pm view on Meta::CPAN
} );
return;
}
sub _validate_do {
my __PACKAGE__ $self = shift;
my $params = shift;
$params = validate_with(
params => $params,
spec => {
query => 1,
args => 0,
cb => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/PgRecvlogical.pm view on Meta::CPAN
$_->{Driver}->{Name} eq 'Pg'
and $_->{pg_server_version} >= PG_MIN_VERSION
and $_->{Name} =~ /replication=/;
},
message => sub {
my $parent_check = (InstanceOf ['DBI::db'])->validate($_);
return $parent_check if $parent_check;
return "$_ is not a DBD::Pg handle" unless $_->{Driver}->{Name} eq 'Pg';
return "$_ is connected to an old postgres version ($_->{pg_server_version} < 9.4.0)"
unless $_->{pg_server_version} >= PG_MIN_VERSION;
return "$_ is not a replication connection: $_->{Name}" unless $_->{Name} =~ /replication=/;
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/REST/Server.pm view on Meta::CPAN
my ($self, $id, $code, $custom_header, $body) = @_;
my $HTTP_EOL = "\r\n";
my $header = {
'Cache-Control' => 'max-age=0, no-cache, must-revalidate, proxy-revalidate, private',
'Pragma' => 'no-cache',
'Content-Type' => 'application/octet-stream',
%$custom_header,
'Content-Length' => length($body),
'Server' => $self->{name},
view all matches for this distribution
view release on metacpan or search on metacpan
share/fixed_amqp0-8.xml view on Meta::CPAN
method. If set to zero, the delivery tag refers to a single
message. If the multiple field is 1, and the delivery tag is zero,
tells the server to acknowledge all outstanding mesages.
</doc>
<doc name = "rule" test = "amq_basic_20">
The server MUST validate that a non-zero delivery-tag refers to an
delivered message, and raise a channel exception if this is not the
case.
</doc>
</field>
</method>
share/fixed_amqp0-8.xml view on Meta::CPAN
method. If set to zero, the delivery tag refers to a single
message. If the multiple field is 1, and the delivery tag is zero,
tells the server to acknowledge all outstanding mesages.
</doc>
<doc name = "rule">
The server MUST validate that a non-zero delivery-tag refers to an
delivered message, and raise a channel exception if this is not the
case.
</doc>
</field>
</method>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/SMTP/Server.pm view on Meta::CPAN
use AnyEvent::SMTP::Server;
my $server = AnyEvent::SMTP::Server->new(
port => 2525,
mail_validate => sub {
my ($m,$addr) = @_;
if ($good) { return 1 } else { return 0, 513, 'Bad sender.' }
},
rcpt_validate => sub {
my ($m,$addr) = @_;
if ($good) { return 1 } else { return 0, 513, 'Bad recipient.' }
},
data_validate => sub {
my ($m,$data) = @_;
my $size = length $data;
if ($size > $max_email_size) {
return 0, 552, 'REJECTED: message size limit exceeded';
} else {
lib/AnyEvent/SMTP/Server.pm view on Meta::CPAN
@addrs = map { $_->address } Mail::Address->parse($from);
@addrs == 1 or return $con->reply('501 Usage: MAIL FROM:<mail addr>');
} else {
@addrs = ('');
}
if ($self->{mail_validate}) {
my ($res,$err,$errstr) = $self->{mail_validate}->($con->{m}, $addrs[0]);
$res or return $con->reply("$err $errstr");
}
$con->{m}{from} = $addrs[0];
$con->ok;
},
lib/AnyEvent/SMTP/Server.pm view on Meta::CPAN
my $to = join ' ',@args;
$to =~ s{^to:}{}i or return $con->reply('501 Usage: RCPT TO:<mail addr>');
defined $con->{m}{from} or return $con->reply("503 Error: need MAIL command");
my @addrs = map { $_->address } Mail::Address->parse($to);
@addrs or return $con->reply('501 Usage: RCPT TO:<mail addr>');
if ($self->{rcpt_validate}) {
my ($res,$err,$errstr) = $self->{rcpt_validate}->($con->{m}, $addrs[0]);
$res or return $con->reply("$err $errstr");
}
push @{ $con->{m}{to} ||= [] }, $addrs[0];
$con->ok;
},
lib/AnyEvent/SMTP/Server.pm view on Meta::CPAN
defined $con->{m}{from} or return $con->reply("503 Error: need MAIL command");
$con->{m}{to} or return $con->reply("554 Error: need RCPT command");
$con->reply("354 End data with <CR><LF>.<CR><LF>");
$con->data(cb => sub {
my $data = shift;
if ($self->{data_validate}) {
my ($res,$err,$errstr) = $self->{data_validate}->($con->{m}, $data);
$res or return $con->reply("$err $errstr");
}
$con->{m}{data} = $data;
local $s->{event_failed} = 0;
local $s->{current_con} = $con;
view all matches for this distribution
view release on metacpan or search on metacpan
t/setup-errors.t view on Meta::CPAN
use Test::More tests => 2;
## The point of this test is to verify that exceptions thrown in
## setup callbacks are propagated to the client. It also validates
## that by default workers are restarted on setup errors.
my $attempt = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/WebSocket/Server.pm view on Meta::CPAN
=over
=item C<handshake> => CODE (optional)
A subroutine reference to customize the WebSocket handshake process.
You can use this option to validate and preprocess the handshake request and customize the handshake response.
For each request, the handshake code is called like
($response, @other_results) = $handshake->($request, $default_response)
lib/AnyEvent/WebSocket/Server.pm view on Meta::CPAN
=item C<validator> => CODE (optional)
B<< This option is only for backward compatibility. Use C<handshake> option instead. If C<handshake> option is specified, this option is ignored. >>
A subroutine reference to validate the incoming WebSocket request.
If omitted, it accepts the request.
The validator is called like
@other_results = $validator->($request)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Ext/HTML.pm view on Meta::CPAN
Initialize the extension. This does not need to be called externally.
=head1 CAVEATS
HTML messages are not validated nor escaped, so it is your responsibility to
use valid XHTML-IM tags and to close them properly.
=head1 AUTHOR
Charles McGarvey <ccm@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
uvoffuni_to_utf8_flags||5.019004|
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
valid_utf8_to_uvchr||5.015009|
valid_utf8_to_uvuni||5.015009|
validate_proto|||
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
},
);
sub endpoint {
my $in = shift;
return Endpoint()->validate($in) ? 0 : 1;
}
runtests;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/DNS.pm view on Meta::CPAN
my ($res) = @_;
if ($res->{tc}) {
# success, but truncated, so use tcp
AnyEvent::Socket::tcp_connect (AnyEvent::Socket::format_address ($server), DOMAIN_PORT, sub {
return unless $do_retry; # some other request could have invalidated us already
my ($fh) = @_
or return &$do_retry;
require AnyEvent::Handle;
lib/AnyEvent/DNS.pm view on Meta::CPAN
my $handle; $handle = new AnyEvent::Handle
fh => $fh,
timeout => $timeout,
on_error => sub {
undef $handle;
return unless $do_retry; # some other request could have invalidated us already
# failure, try next
&$do_retry;
};
$handle->push_write (pack "n/a*", $req->[0]);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyMerchant.pm view on Meta::CPAN
=head2 gateway
my $gateway = AnyMerchant->gateway('Balanced', password => 'abc123');
This is a static factory method that creates an AnyMerchant::Gateway::* object,
validates its interface, and returns it.
In the above example, an AnyMerchant::Gateway::Balanced object is returned.
=head1 AUTHOR
Naveed Massjouni <naveedm9@gmail.com>
view all matches for this distribution