view release on metacpan or search on metacpan
CHANGELOG
v2.01 (2019/05/24)
==================
--Typos in documentation (Debian Perl Group)
--Conceiving a child would leave an errant object alive even
if it failed initialization. This is fixed.
v2.00 (2017/01/23)
==================
--Complete rewrite
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/VitalStatus.pm view on Meta::CPAN
use warnings;
package VitalStatus;
use Exporter qw( import );
use Class::Enumeration::Builder { predicate => 1 }, qw( dead alive );
1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Meta.pm view on Meta::CPAN
use Class::Meta::Types::Perl 'semi-affordance';
The boolean data type is the only one that uses a slightly different approach
to the creation of affordance accessors: It creates three of them. Assuming
you're creating a boolean attribute named "alive", it will create these
accessors:
sub is_alive { shift->{alive} }
sub set_alive_on { shift->{alive} = 1 }
sub set_alive_off { shift->{alive} = 0 }
Incidentally, I stole the term "affordance" from Damian Conway's "Object
Oriented Perl," pp 83-84, where he borrows it from Donald Norman.
See L<Class::Meta::Type|Class::Meta::Type> for details on creating new data
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/More.pm view on Meta::CPAN
This declares a block of tests to skip, why and under what conditions
to skip them. An example is the easiest way to illustrate:
skip {
ok( head("http://www.foo.com"), "www.foo.com is alive" );
ok( head("http://www.foo.com/bar"), " and has bar" );
} 2, "LWP::Simple not installed",
!eval { require LWP::Simple; LWP::Simple->import; 1 };
The $if condition is optional, but $why is not.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Rebirth.pm view on Meta::CPAN
# Andreas Hernitscheck ahernit(AT)cpan.org
# @brief Takes a death object and and creates a living object of it.
# Such a zombie class looks like a normal class when you dump it.
# But it is not alive, means methods won't work. An Effect which
# happens by deserializing classes from a store (dumped data).
sub rebirth { # $object ($zombie)
my $zombie = shift or croak "requires zombie";
my $obj;
lib/Class/Rebirth.pm view on Meta::CPAN
my $object = rebirth($zombie);
Takes a death object and and creates a living object of it.
Such a zombie class looks like a normal class when you dump it.
But it is not alive, means methods won't work. An effect which
happens by deserializing classes from a store (dumped data).
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ClickHouse.pm view on Meta::CPAN
'_host' => 'localhost',
'_port' => 8123,
'_database' => 'default',
'_user' => '',
'_password' => '',
'_keep_alive' => 1,
'_format' => 'TabSeparated',
'_socket' => undef,
'_uri' => undef,
'_timeout' => 30,
);
lib/ClickHouse.pm view on Meta::CPAN
# create Net::HTTP object
my $socket = Net::HTTP->new(
'Host' => $self->{'_host'},
'PeerPort' => $self->{'_port'},
'HTTPVersion' => '1.1',
'KeepAlive' => $self->{'_keep_alive'},
'Timeout' => $self->{'_timeout'},
) or die "Can't connect: $@";
# create URI object
lib/ClickHouse.pm view on Meta::CPAN
sub DESTROY {}
sub disconnect {
my ($self) = @_;
if (my $socket = $self->_get_socket()) {
$socket->keep_alive(0);
$self->ping();
}
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/14-weakened-ref.t view on Meta::CPAN
plan tests => 16;
# GH #15 - Weakened refs always clone as undef
# When cloning a structure with weakened references, Clone should
# preserve the weakness and keep referents alive when strong
# references to them exist elsewhere in the clone graph.
{
package Parent;
sub new { bless { children => [] }, shift }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Prima/CodeManager/Label.pm view on Meta::CPAN
}
sub on_click
{
my ( $self, $f) = ( $_[0], $_[0]-> {focusLink});
$f-> select if defined $f && $f-> alive && $f-> enabled;
}
sub on_keydown
{
my ( $self, $code, $key, $mod) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
ex/httpd.pl view on Meta::CPAN
is => 'rw',
lazy => 1,
default => sub { length( $_[0]->content ) },
);
has keep_alive => (
isa => 'Bool',
is => 'rw',
predicate => 'has_keep_alive',
);
has forwarded_from => (
isa => 'Str',
is => 'rw',
ex/httpd.pl view on Meta::CPAN
my $proto = $req->protocol;
$r->protocol($proto);
if ( $proto && $proto eq 'HTTP/1.1' ) {
# in 1.1, keep-alive is assumed
$req->keep_alive(1) unless $req->has_keep_alive;
}
elsif ( $proto && $proto eq 'HTTP/1.0' ) {
unless ( $req->has_keep_alive ) {
my $connection = $req->header('connection');
if ( $connection && $connection =~ m/^keep-alive$/i ) {
$r->header( 'Connection' => 'keep-alive' );
$req->keep_alive(1);
}
else {
$req->keep_alive(0);
}
}
}
else {
$req->keep_alive(0);
}
# XXX check for content length if keep-alive?
if ( $self->has_content ) {
my $out = $self->content;
$r->content( $self->content );
$r->header( 'Content-Length' => $self->content_length );
}
ex/httpd.pl view on Meta::CPAN
}
}
$r->header( 'X-Sprocket-CID' => $con->ID );
unless ( $req->keep_alive ) {
$r->header( 'Connection' => 'close' );
$con->wheel->pause_input(); # no more requests
$con->send($r);
$con->close();
}
view all matches for this distribution
view release on metacpan or search on metacpan
include/in.h view on Meta::CPAN
#define COLOURING_CLASS "Colouring::In::XS"
#define COLOURING_CLASS_LEN 17
/* ââ Message store (set from Perl side) âââââââââââââââââââââââââ */
/* Holds a refcount-managed reference to the user's message hash so
* the underlying HV stays alive after set_messages() returns. */
static SV * MESSAGES_REF = NULL;
#define MESSAGES \
((MESSAGES_REF && SvROK(MESSAGES_REF)) ? (HV*)SvRV(MESSAGES_REF) : NULL)
view all matches for this distribution
view release on metacpan or search on metacpan
ext/zstd/contrib/seekable_format/zstd_seekable.h view on Meta::CPAN
* Call ZSTD_seekable_init* to initialize a ZSTD_seekable object with the
* the seek table provided in the input.
* There are three modes for ZSTD_seekable_init:
* - ZSTD_seekable_initBuff() : An in-memory API. The data contained in
* `src` should be the entire seekable file, including the seek table.
* `src` should be kept alive and unmodified until the ZSTD_seekable object
* is freed or reset.
* - ZSTD_seekable_initFile() : A simplified file API using stdio. fread and
* fseek will be used to access the required data for building the seek
* table and doing decompression operations. `src` should not be closed
* or modified until the ZSTD_seekable object is freed or reset.
view all matches for this distribution
view release on metacpan or search on metacpan
ext/zstd/contrib/seekable_format/zstd_seekable.h view on Meta::CPAN
* Call ZSTD_seekable_init* to initialize a ZSTD_seekable object with the
* the seek table provided in the input.
* There are three modes for ZSTD_seekable_init:
* - ZSTD_seekable_initBuff() : An in-memory API. The data contained in
* `src` should be the entire seekable file, including the seek table.
* `src` should be kept alive and unmodified until the ZSTD_seekable object
* is freed or reset.
* - ZSTD_seekable_initFile() : A simplified file API using stdio. fread and
* fseek will be used to access the required data for building the seek
* table and doing decompression operations. `src` should not be closed
* or modified until the ZSTD_seekable object is freed or reset.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Concierge/Sessions/Session.pm view on Meta::CPAN
=item * Clears the dirty flag on success
=back
The save() method also implements sliding window expiration. Each save() extends
the session timeout from the current time, keeping active sessions alive.
For indefinite sessions (session_timeout set to 'indefinite'), save() still
persists data but does not modify expiration (session never expires).
=head2 Status Check Methods
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Concurrent/Errorhandler.pm view on Meta::CPAN
package Foo;
use Concurrent::Errorhandler;
@ISA = qw(Concurrent::Errorhandler);
sub alive {
..
..
return
$self->error ("Awake, awake! Ring the alarum bell. \
Murther and treason!", $dagger)
lib/Concurrent/Errorhandler.pm view on Meta::CPAN
package main;
use Foo;
my $foo = new Foo;
$foo->alive($king) or print $foo->errstr();
# prints "Awake, awake! ... "
=head1 DESCRIPTION
Concurrent::Errorhandler encapsulates the error handling mechanism used
view all matches for this distribution
view release on metacpan or search on metacpan
t/httpd.conf view on Meta::CPAN
# libraries it uses) leak memory or other resources. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For these platforms, set to something like 10000
# or so; a setting of 0 means unlimited.
#
# NOTE: This value does not include keepalive requests after the initial
# request per connection. For example, if a child process handles
# an initial request and 10 subsequent "keptalive" requests, it
# would only count as 1 request towards this limit.
#
MaxRequestsPerChild 0
#
t/httpd.conf view on Meta::CPAN
#
<IfModule mod_setenvif.c>
#
# The following directives modify normal HTTP response behavior.
# The first directive disables keepalive for Netscape 2.x and browsers that
# spoof it. There are known problems with these browser implementations.
# The second directive is for Microsoft Internet Explorer 4.0b2
# which has a broken HTTP/1.1 implementation and does not properly
# support keepalive when it is used on 301 or 302 (redirect) responses.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
#
# The following directive disables HTTP/1.1 responses to browsers which
# are in violation of the HTTP/1.0 spec by not being able to grok a
# basic 1.1 response.
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"libpod-spell-perl", "Pod-Spell", "1.01", "0", "0"
"libpod-xhtml-perl", "Pod-Xhtml", "1.59", "0", "0"
"libpoe-api-peek-perl", "POE-API-Peek", "1.3000", "0", "0"
"libpoe-component-client-dns-perl", "POE-Component-Client-DNS", "1.00", "0", "1"
"libpoe-component-client-http-perl", "POE-Component-Client-HTTP", "0.84", "0", "2"
"libpoe-component-client-keepalive-perl", "POE-Component-Client-Keepalive", "0.1001", "0", "0"
"libpoe-component-ikc-perl", "POE-Component-IKC", "0.2001", "0", "0"
"libpoe-component-irc-perl", "POE-Component-IRC", "5.84", "0", "1"
"libpoe-component-jabber-perl", "POE-Component-Jabber", "2.02", "0", "1"
"libpoe-component-jobqueue-perl", "POE-Component-JobQueue", "0.5500", "1", "1"
"libpoe-component-pluggable-perl", "POE-Component-Pluggable", "1.10", "0", "0"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/General/Hierarchical.pm view on Meta::CPAN
substitution> is made at get time, so the B<value> substituted is the final one of the
variable. The B<value> of C<variable_name> is obtained by a C<get()> call, so the B<syntax
constraiant> check is performed on it before the substitution.
To do the I<inline variable substituition> is necessary that a reference to the B<root
node> is still alive, otherwise a C<die()> is called. Anyway, it is possible to call the
C<check()> method on the B<node> before loosing the B<root node> reference in order to
cache all the values. It can be called explicitally on a B<node> of implicitally by
the C<new()> methed using the C<check> parameter with a true value.
# config.conf file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/models/LCDd/hd44780.pl view on Meta::CPAN
'value_type' => 'uniline'
},
'KeepAliveDisplay',
{
'description' => 'Some displays (e.g. vdr-wakeup) need a message from the driver to that it
is still alive. When set to a value bigger then null the character in the
upper left corner is updated every <KeepAliveDisplay> seconds. Default: 0.',
'type' => 'leaf',
'upstream_default' => '0',
'value_type' => 'uniline'
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/models/Ssh/HostElement.pl view on Meta::CPAN
any environment variables.',
'type' => 'list'
},
'ServerAliveCountMax',
{
'description' => 'Sets the number of server alive
messages (see below) which may be sent without L<ssh(1)>
receiving any messages back from the server. If this
threshold is reached while server alive messages are being
sent, ssh will disconnect from the server, terminating the
session. It is important to note that the use of server
alive messages is very different from B<TCPKeepAlive>
(below). The server alive messages are sent through the
encrypted channel and therefore will not be spoofable. The
TCP keepalive option enabled by B<TCPKeepAlive> is
spoofable. The server alive mechanism is valuable when the
client or server depend on knowing when a connection has
become inactive.The default
value is 3. If, for example, B<ServerAliveInterval> (see
below) is set to 15 and B<ServerAliveCountMax> is left
at the default, if the server becomes unresponsive, ssh will
lib/Config/Model/models/Ssh/HostElement.pl view on Meta::CPAN
'value_type' => 'enum'
},
'TCPKeepAlive',
{
'description' => 'Specifies whether the system
should send TCP keepalive messages to the other side. If
they are sent, death of the connection or crash of one of
the machines will be properly noticed. This option only uses
TCP keepalives (as opposed to using ssh level keepalives),
so takes a long time to notice when the connection dies. As
such, you probably want the B<ServerAliveInterval>
option as well. However, this means that connections will
die if the route is down temporarily, and some people find
it annoying.To disable TCP
keepalive messages, the value should be set to B<no>.
See also B<ServerAliveInterval> for protocol-level
keepalives.',
'type' => 'leaf',
'upstream_default' => 'yes',
'value_type' => 'boolean',
'write_as' => [
'no',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Common/Kill.pl view on Meta::CPAN
C<SIGTERM> signal (see below) is sent to the main process while the subsequent
C<SIGKILL> signal (see below) is sent to all remaining processes of the unit\'s
control group. If set to C<process>, only the main process itself is killed (not
recommended!). If set to C<none>, no process is killed (strongly recommended
against!). In this case, only the stop command will be executed on unit stop, but no process will be
killed otherwise. Processes remaining alive after stop are left in their control group and the
control group continues to exist after stop unless empty.
Note that it is not recommended to set C<KillMode> to
C<process> or even C<none>, as this allows processes to escape
the service manager\'s lifecycle and resource management, and to remain running even while their
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model.pm view on Meta::CPAN
}
my $cat =_tweak_instance_args(\%args);
my $m_args = delete $args{model_args} // {} ; # used for tests
# model_storage is used to keep Config::Model object alive
$model_storage //= Config::Model->new(%$m_args);
return $model_storage->instance(%args);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Nested.pm view on Meta::CPAN
use Config::Nested;
use Data::Dumper;
my $c = new Config::Nested(
section => [qw( location animal)],
boolean => [qw( happy hungry alive)],
variable => [qw( sex name colour ) ],
array => 'breed exercise owner',
hash => 'path',
);
view all matches for this distribution
view release on metacpan or search on metacpan
conf/sl.conf view on Meta::CPAN
# apache settings
sl_apache_maxclients 48
sl_apache_start_servers 36
sl_apache_max_spare_servers 8
sl_apache_min_spare_servers 4
sl_apache_keepalive On
sl_apache_user apache
sl_apache_group apache
sl_admin support@slwifi.com
sl_apache_listen 127.0.0.1:9998
sl_apache_max_requests_per_child 250
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Connector/Proxy/Net/LDAP.pm view on Meta::CPAN
has timeout => (
is => 'rw',
isa => 'Int',
);
has keepalive => (
is => 'rw',
isa => 'Int',
);
has timelimit => (
lib/Connector/Proxy/Net/LDAP.pm view on Meta::CPAN
}
sub _build_new_options {
my $self = shift;
return $self->_build_options(qw(
timeout verify keepalive debug raw multihomed localaddr
verify sslversion ciphers capath cafile capath clientcert clientkey checkcrl
));
}
sub _build_bind_options {
lib/Connector/Proxy/Net/LDAP.pm view on Meta::CPAN
=over
=item timeout
=item keepalive
=item multihomed
=item localaddr
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Continual/Process/Instance.pm view on Meta::CPAN
return $pid;
}
)->start();
while(1) {
if (!$instance->is_alive()) {
$instance->start();
}
}
=head1 DESCRIPTION
lib/Continual/Process/Instance.pm view on Meta::CPAN
}
return $pid;
}
=head2 is_alive()
is this instance alive?
=cut
sub is_alive {
my ($self) = @_;
return defined $self->pid && !waitpid $self->pid, WNOHANG;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Control/CLI/AvayaData.pm view on Meta::CPAN
$login->{login_attempted} = 1;
}
elsif ($self->console && $login->{wake_console}) {
$self->debugMsg(8,"\nlogin() Sending wake_console sequence >$login->{wake_console}<\n");
$self->put(string => $login->{wake_console}, errmode => 'return') # Bring connection into life
or return $self->poll_return($self->error("$pkgsub: Unable to send bring alive character sequence // ".$self->errmsg));
}
}
if ($login->{stage} < 2) { # Main login loop
my ($pattern, $patdepth, $deepest);
my ($promptType, $capturedPrompt, $switchName, $cliType, $configContext);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Control/CLI/Extreme.pm view on Meta::CPAN
$login->{login_attempted} = 1;
}
elsif ($self->console && $login->{wake_console}) {
$self->debugMsg(8,"\nlogin() Sending wake_console sequence >$login->{wake_console}<\n");
$self->put(string => $login->{wake_console}, errmode => 'return') # Bring connection into life
or return $self->poll_return($self->error("$pkgsub: Unable to send bring alive character sequence // ".$self->errmsg));
}
}
if ($login->{stage} < 2) { # Main login loop
my ($pattern, $patdepth, $deepest);
my ($promptType, $capturedPrompt, $switchName, $cliType, $configContext);
view all matches for this distribution
view release on metacpan or search on metacpan
0.201 Sun Sep 16 03:43:38 CEST 2001
- fixed another segfault-bug in uulib, thanks to Lars Hecking who
provides all the test files ;)
0.2 Thu Jun 14 18:42:49 CEST 2001
- Frank Pilhofer is NOT dead! He is alive, kicking, and fixing
bugs in uulib now! Since his uulib and mine diverged quite
a bit I am still in the process of merging his bugfixes
into my version. So be aware that this might introduce new
instabilities...
- merged uulib-0.5.15
view all matches for this distribution
view release on metacpan or search on metacpan
CHANGELOG.md view on Meta::CPAN
- Fix opening socket in private conversations
## 0.6 (2014-06-09)
- Compatible with Mojolicious 5.0
- New WebSocket keep alive code
- Fix facebook avatars
## 0.5 (2014-05-24)
- Fixed bug with querying people not opening a new tab
view all matches for this distribution
view release on metacpan or search on metacpan
This creates a new coro thread and puts it into the ready queue, meaning
it will run as soon as the CPU is free for it.
C<async> will return a Coro object - you can store this for future
reference or ignore it - a thread that is running, ready to run or waiting
for some event is alive on it's own.
Another way to create a thread is to call the C<new> constructor with a
code-reference:
new Coro sub {
Suspending a coro can be useful when you want to keep the coro from
running, but you don't want to destroy it, or when you want to temporarily
freeze a coro (e.g. for debugging) to resume it later.
A scenario for the former would be to suspend all (other) coros after a
fork and keep them alive, so their destructors aren't called, but new
coros can be created.
=item $coro->resume
If the specified coro was suspended, it will be resumed. Note that when
view all matches for this distribution