view release on metacpan or search on metacpan
lib/Bot/ChatBots/Weak.pod view on Meta::CPAN
look => 'not a reference',
);
$object->set(ahoy => $ref3);
# it's a hash reference inside
$object->{what}->frobozz; # called on $ref1 if still alive
# TO_JSON always returns undef
my $will_be_undef = $object->TO_JSON;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Cobalt/Plugin/WWW.pm view on Meta::CPAN
use Bot::Cobalt;
use Bot::Cobalt::Common;
use POE qw/
Component::Client::HTTP
Component::Client::Keepalive
/;
sub opts {
my $opts = core->get_plugin_cfg($_[0])->{Opts};
lib/Bot/Cobalt/Plugin/WWW.pm view on Meta::CPAN
Agent => __PACKAGE__,
Alias => 'ht_'. core()->get_plugin_alias($self),
ConnectionManager => POE::Component::Client::Keepalive->new(
keep_alive => 1,
max_per_host => $self->max_per_host,
max_open => $self->max_workers,
timeout => $self->timeout,
),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Net/Server.pm view on Meta::CPAN
This is yielded at the end of the L</on _start> handler for the L<POE> session. Your server should perform any initialization needed here.
=head2 on server quit
A server should emit this state when it wants the server to disconnect and shutdown. If all mixins are implemented correctly, they should listen for this state and close all resources, which should result in the server going into the L</on _stop> sta...
This should be used by protocol mixins to implement the shutdown sequence for their listening ports, open files, etc.
=head2 on server shutdown
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Pastebot/Client/Irc.pm view on Meta::CPAN
$kernel->alias_set( "irc_client_$server" );
$irc->yield( register => 'all' );
$heap->{server_index} = 0;
# Keep-alive timer.
$kernel->delay( autoping => 300 );
$kernel->yield( 'connect' );
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BrLock.pm view on Meta::CPAN
Carvalho and Roucariol, On mutual exclusion in computer networks,
ACM Communications, Feb83.
The algorithm features minimal messages for acquiring the next lock,
but with the trade-off of network being reliable enough to ensure that
all nodes are alive. In fact, one node won't be able to acquire the
next lock if it can't communicate to all other nodes (unless the node
which was the last one to acquire the lock).
If this is a hard constraint for you, you may want to use IPC::Lock.
view all matches for this distribution
view release on metacpan or search on metacpan
script/bracket_server.pl view on Meta::CPAN
-f --fork handle each request in a new process
(defaults to false)
-? --help display this help and exits
-h --host host (defaults to all)
-p --port port (defaults to 3000)
-k --keepalive enable keep-alive connections
-r --restart restart when files get modified
(defaults to false)
-rd --restart_delay delay between file checks
(ignored if you have Linux::Inotify2 installed)
-rr --restart_regex regex match files that trigger
view all matches for this distribution
view release on metacpan or search on metacpan
t/test1.xml view on Meta::CPAN
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:26:53 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-bt0 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
t/test1.xml view on Meta::CPAN
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://192.168.163.128/beef/
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:27:02 GMT
t/test1.xml view on Meta::CPAN
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:26:53 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-bt0 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
t/test1.xml view on Meta::CPAN
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://192.168.163.128/beef/
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:27:02 GMT
t/test1.xml view on Meta::CPAN
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:26:17 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-bt0 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
t/test1.xml view on Meta::CPAN
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://192.168.163.128/beef/
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:27:11 GMT
t/test1.xml view on Meta::CPAN
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
]]></request>
<response><![CDATA[HTTP/1.1 200 OK
Date: Mon, 12 Oct 2009 14:26:53 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-bt0 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
view all matches for this distribution
view release on metacpan or search on metacpan
t/business/gocardless/resource.t view on Meta::CPAN
extends "Business::GoCardless::Resource";
has [ qw/
name
age
alive
time
/ ] => (
is => 'rw',
);
t/business/gocardless/resource.t view on Meta::CPAN
isa_ok(
my $TestResource = TestResource->new(
name => "Lee",
age => 30,
alive => JSON::true,
time => "2014-08-20T21:41:25Z",
client => Business::GoCardless::Client->new(
token => 'foo',
app_id => 'bar',
app_secret => 'baz',
t/business/gocardless/resource.t view on Meta::CPAN
client
to_hash
to_json
name
age
alive
time
/,
);
is( $TestResource->endpoint,'/test_resources/%s','endpoint' );
cmp_deeply(
{ $TestResource->to_hash },
{
'age' => 30,
'alive' => JSON::true,
'endpoint' => '/test_resources/%s',
'name' => 'Lee',
'time' => '2014-08-20T21:41:25Z'
},
'to_hash'
t/business/gocardless/resource.t view on Meta::CPAN
is(
$TestResource->to_json,
JSON->new->canonical->encode( {
'age' => 30,
'alive' => JSON::true,
'endpoint' => '/test_resources/%s',
'name' => 'Lee',
'time' => '2014-08-20T21:41:25Z'
} ),
'to_json'
view all matches for this distribution
view release on metacpan or search on metacpan
return 1;
}
sub ping
# try and confirm the server connection is alive
{
my $self = shift;
$@ = "not connected", return undef unless $self->{'io'}->connected;
view all matches for this distribution
view release on metacpan or search on metacpan
share/www/static/jquery.js view on Meta::CPAN
return "script";
}
});
var xhrCallbacks, xhrSupported,
xhrId = 0,
// #5280: Internet Explorer will keep connections alive if we don't abort on unload
xhrOnUnloadAbort = window.ActiveXObject && function() {
// Abort all pending requests
var key;
for ( key in xhrCallbacks ) {
xhrCallbacks[ key ]( undefined, true );
view all matches for this distribution
view release on metacpan or search on metacpan
src/sparse-0.4.4/storage.c view on Meta::CPAN
/*
* Storage - associate pseudos with "storage" that keeps them alive
* between basic blocks. The aim is to be able to turn as much of
* the global storage allocation problem as possible into a local
* per-basic-block one.
*
* Copyright (C) 2004 Linus Torvalds
view all matches for this distribution
view release on metacpan or search on metacpan
src_bin/suricata_extract_submit view on Meta::CPAN
closelog();
print $message. "\n";
} ## end sub log_something
my $alive;
eval { $alive = Proc::PID::File->running(); };
if ($@) {
log_something( 'err', 'PID file check failed... ' . $@ );
exit 1;
}
if ($alive) {
log_something( 'err', 'Already running as ' . $alive );
exit 1;
}
log_something( 'info', 'Suricata Malware Extractor starting up..' );
view all matches for this distribution
view release on metacpan or search on metacpan
eval {
local $SIG{'__WARN__'} = sub {};
CBOR::Free::decode($cbor);
};
ok 1, "$node: still alive";
}
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
spaceinvaders/spaceInvaders.pl view on Meta::CPAN
$c->after(100, \&maint);
}
}
my $downrow;
sub march {
my($collisions,$alive)=(0,0);
for (@badguys) {
delete $_->{oldloc};
if ($_->{dead} && $_->{dead}<0 ) {
if ($_->{dead} == $deathdelay) {
$_->{sprite}->names("");
spaceinvaders/spaceInvaders.pl view on Meta::CPAN
unless (++$_->{dead}) {
$_->{sprite}->remove;
$_->{dead}++;
}
}
$alive++ unless $_->{dead};
}
@badguys=() unless $alive;
for (@badguys) {
next if $_->{dead};
$_->{oldloc}=[ $_->{sprite}->place ];
($t::x, $t::y)=@{ $_->{oldloc} };
$t::x+=$alienmove*$direction;
view all matches for this distribution
view release on metacpan or search on metacpan
t/cgi_security.t view on Meta::CPAN
my $shell_host = 'ec2-1-2-3-4.compute-1.amazonaws.com; cat /etc/passwd';
my $inject_guard = mock_scoped 'CGI::ACL::_verified_rdns' => sub { $shell_host };
my $acl = CGI::ACL->new()->deny_cloud();
my $result = eval { denied_at($acl, $CLOUD_IP) };
ok(!$@, 'shell-metachar PTR hostname does not cause an exception');
pass('no command was executed; test process alive after shell payload in PTR');
};
subtest 'ATTACK: PTR record with CRLF sequence (header-splitting via DNS)' => sub {
# Exploit: \r\n in a PTR record could split HTTP headers if the hostname
# were ever emitted in a response. CGI::ACL does not output the hostname.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/example_form/script/example_form_server.pl view on Meta::CPAN
-f --fork handle each request in a new process
(defaults to false)
-? --help display this help and exits
-h --host host (defaults to all)
-p --port port (defaults to 3000)
-k --keepalive enable keep-alive connections
-r --restart restart when files get modified
(defaults to false)
-rd --restart_delay delay between file checks
(ignored if you have Linux::Inotify2 installed)
-rr --restart_regex regex match files that trigger
view all matches for this distribution
view release on metacpan or search on metacpan
t/locales.t view on Meta::CPAN
};
# Concurrent instances must not share state through the cache or globals.
# country() reads $ENV{REMOTE_ADDR} lazily at call time, so we must keep the
# correct REMOTE_ADDR in scope when calling country() on each object. Both
# objects are kept alive simultaneously (declared in the outer scope) to verify
# true concurrent isolation â neither touches the other's _country field.
subtest 'Concurrent instances do not share state' => sub {
Test::Mockingbird::mock('IP::Country::Fast', 'inet_atocc', sub {
my ($self_mock, $ip) = @_;
return $ip =~ /^8\.8/ ? 'US' : 'FR';
});
local %ENV = (HTTP_ACCEPT_LANGUAGE => 'en');
# Create and immediately resolve each object while its REMOTE_ADDR is live.
# $us and $fr are declared in the outer scope so both remain alive together.
my ($us, $us_cc);
{ local $ENV{REMOTE_ADDR} = '8.8.8.8';
$us = CGI::Lingua->new(supported => ['en', 'fr']);
$us_cc = $us->country(); }
view all matches for this distribution
view release on metacpan or search on metacpan
t/public_html/demo/civil.txt view on Meta::CPAN
business in which they are concerned; they are all peaceably inclined.
Now, what are they? Men at all? or small movable forts and
magazines, at the service of some unscrupulous man in power? Visit the
Navy-Yard, and behold a marine, such a man as an American government
can make, or such as it can make a man with its black arts- a mere
shadow and reminiscence of humanity, a man laid out alive and
standing, and already, as one may say, buried under arms with
funeral accompaniments, though it may be,
"Not a drum was heard, not a funeral note,
view all matches for this distribution
view release on metacpan or search on metacpan
$ENV{'DOCUMENT_ROOT'} = '/var/www/html';
$ENV{'GATEWAY_INTERFACE'} = 'CGI/1.1';
$ENV{'HTTP_ACCEPT'} = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$ENV{'HTTP_ACCEPT_ENCODING'} = 'gzip, deflate';
$ENV{'HTTP_ACCEPT_LANGUAGE'} = 'en-us,en;q=0.5';
$ENV{'HTTP_CONNECTION'} = 'keep-alive';
$ENV{'HTTP_COOKIE'} = 'cookie_single_val=pH3FdqRbvd; cookie_multiple_vals=v&xD5wnHLJNv&j&3';
$ENV{'HTTP_HOST'} = 'www.example.com';
$ENV{'HTTP_USER_AGENT'} = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1';
$ENV{'LD_LIBRARY_PATH'} = '/usr/local/apache2/lib';
$ENV{'MACHINE_NAME'} = 'Idocs';
view all matches for this distribution
view release on metacpan or search on metacpan
memcache.pm view on Meta::CPAN
This driver requires Memcached connection handle to be passed to CGI::Session constructor as "raw" connection handle ({'Handle' => $memd}), making
caller responsible for passing a valid connection. This is actually good for relieving CGI::Session from the intricacies of suppporting various Memcached client
modules with differences in constructions (the rest of the main API on these module is generally very similar).
This driver and CGI::Session underpinnings do very little to ensure the server is actually alive.
The situation is even worse for Memcached client modules that return valid client instance
without server running (This is very different from lot of other DB Modules like DBI/DBD* or Net::LDAP,
where any problems with server raises exceptions or returns undefined handles).
Make sure your server is alive by either Calling stats() on Memcached client:
my $stats = $memd->stats(); # Allows: [$keys]
if (ref($stats) || !$stats->{'total'}) {die("No stats from Memcached - Memcached not running ?");}
... or by doing a set/get test sequence:
view all matches for this distribution
view release on metacpan or search on metacpan
src/speedy_backend.h view on Meta::CPAN
slotnum_t speedy_backend_create_slot(slotnum_t gslotnum);
void speedy_backend_remove_be_wait(slotnum_t gslotnum);
int speedy_backend_below_maxbe(slotnum_t gslotnum);
void speedy_backend_exited(slotnum_t bslotnum, int exit_on_sig, int exit_val);
#define speedy_backend_alive(b) \
(speedy_util_kill(FILE_SLOT(be_slot, (b)).pid, 0) != -1)
#define speedy_backend_dead(b) (!speedy_backend_alive(b))
/* Backend is dead, simulate sigkill */
#define speedy_backend_died(b) speedy_backend_exited((b),1,SIGKILL)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Test.pm view on Meta::CPAN
request. Since there is no browser making any request here, the
default is set to "iso-8859-1".
=item C<HTTP_CONNECTION>
Whether the connection should be kept alive by the server or closed after
this request. Defaults to "Close", but since there's no connection and
no real client...
=item C<HTTP_HOST>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CHI/Driver/LMDB.pm view on Meta::CPAN
single_txn => 1
B<SPEED>: For performance benefits, have a single transaction
that lives from the creation of the CHI cache till its destruction.
However, B<WARNING:> this flag is currently a bit dodgy, and CHI caches being kept alive
till global destruction B<WILL> trigger a C<SEGV>, and potentially leave your cache broken.
You can avoid this by manually destroying the cache with:
undef $cache
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"libpod-xhtml-perl", "Pod-Xhtml", "1.60", "0", "0"
"libpod2-base-perl", "POD2-Base", "0.043", "0", "2"
"libpoe-api-peek-perl", "POE-API-Peek", "2.1600", "1", "0"
"libpoe-component-client-dns-perl", "POE-Component-Client-DNS", "1.051", "0", "1"
"libpoe-component-client-http-perl", "POE-Component-Client-HTTP", "0.942", "0", "2"
"libpoe-component-client-keepalive-perl", "POE-Component-Client-Keepalive", "0.2660", "0", "1"
"libpoe-component-client-mpd-perl", "POE-Component-Client-MPD", "1.100430", "0", "0"
"libpoe-component-client-ping-perl", "POE-Component-Client-Ping", "1.163", "0", "0"
"libpoe-component-dbiagent-perl", "POE-Component-DBIAgent", "0.26", "0", "1"
"libpoe-component-ikc-perl", "POE-Component-IKC", "0.2200", "1", "0"
"libpoe-component-irc-perl", "POE-Component-IRC", "6.54", "0", "2"
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/dists/SQL-Statement.changes view on Meta::CPAN
* add abstract methods for all methods derived classes must override
(this means, open_table for SQL::Statement deriveds must be overridden
and all data access methods of tables - see SQL::Eval::Table for details)
* Tests are fixed to use TEMP TABLES explicitely when required
* check for invalid column names fixed
* Don't let depreciated parser structures stay alive in SQL::Statement when
reusing the Parser
[Documentation]
* Method documentation of SQL::Statement and SQL::Eval::Table are improved
* Add a Roadmap describing future plans for SQL::Statement (in addition to
view all matches for this distribution
view release on metacpan or search on metacpan
script/cpan_mini_inject_rest_server.pl view on Meta::CPAN
-f --fork handle each request in a new process
(defaults to false)
-? --help display this help and exits
-h --host host (defaults to all)
-p --port port (defaults to 3000)
-k --keepalive enable keep-alive connections
-r --restart restart when files get modified
(defaults to false)
-rd --restart_delay delay between file checks
(ignored if you have Linux::Inotify2 installed)
-rr --restart_regex regex match files that trigger
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Mini.pm view on Meta::CPAN
$version = 'v?' unless defined $version;
$self->{__lwp} = LWP::UserAgent->new(
agent => "$class/$version",
env_proxy => 1,
($self->{no_conn_cache} ? () : (keep_alive => 5)),
($self->{timeout} ? (timeout => $self->{timeout}) : ()),
);
unless ($self->{offline}) {
my $test_uri = URI->new_abs(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Testers/Metabase/Demo.pm view on Meta::CPAN
isa => 'Str',
lazy => 1,
builder => '_build_data_directory',
);
# keeps the tempdir alive until process exits
has '_cache' => (
is => 'ro',
isa => 'HashRef',
default => sub { {} },
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cpan.pm view on Meta::CPAN
else {
$ping->{'port_num'} = $port;
}
$ping->hires(1) if $ping->can( 'hires' );
my( $alive, $rtt ) = eval{ $ping->ping( $url->host ) };
$alive ? $rtt : undef;
}
sub _load_local_lib # -I
{
$logger->debug( "Loading local::lib" );
view all matches for this distribution