Result:
found more than 865 distributions - search limited to the first 2001 files matching your query ( run in 1.884 )


Cisco-Accounting

 view release on metacpan or  search on metacpan

lib/Cisco/Accounting.pm  view on Meta::CPAN

	}
}


##
## Send a keepalive (new line character), do not do any error checking here
## Useful if 'persistent' is enabled, but still it's up to you to call the keepalive in time before session times out
##
sub keepalive()  {
	my ($self) = shift;
	
	if ($self->{'session'})  {
		eval  {
			$self->{'session'}->cmd(" ");

lib/Cisco/Accounting.pm  view on Meta::CPAN

	totalpackets		total number of packets seen for every time do_accounting() was called
	totalpolledlines	total number of lines that was parsed and aggregated
	totalskippedlines	total number of lines that were skipped (headers etc.)
	uniquehostpairs		total number of unique host pairs that were seen

=item keepalive()

If you have a persistent connection but you're only calling do_accounting() every 5 minutes for example then you might receive
a connection timeout.
This can be solved by sending a keepalive every 30 seconds for example.
The keepalive just sends a newline character to the remote host avoiding a connection timeout.

	$acct->keepalive()

=back

=head1 SUPPORTED DEVICES

 view all matches for this distribution


Cisco-Reconfig

 view release on metacpan or  search on metacpan

t/indentbug.t  view on Meta::CPAN

! Last configuration change at 22:19:05 GMT Wed Jun 4 2003 by xyz
! NVRAM config last updated at 22:19:05 GMT Wed Jun 4 2003 by xyz
!
version 12.2
no service pad
service tcp-keepalives-in
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service compress-config
!

 view all matches for this distribution


Citrix

 view release on metacpan or  search on metacpan

Citrix/SessionSet.pm  view on Meta::CPAN

   # Added loading of Net::Ping to circumvent
   eval {require(Net::Ping);};
   if ($@) {} # print("Dont have Net::Ping (risk hanging)");
   else {
      my $p = Net::Ping->new();
      if ($p->ping($usehost)) {if ($trace) {print("$usehost is alive (reachable by PING).\n");}}
      # Reuse $tout as state variable
      else {$tout = 0;}
      $p->close();
      if (!$tout) {$ss->{'msg'} = "$usehost NOT Alive.\n";return(1);}
   }

 view all matches for this distribution


ClamAV-Client

 view release on metacpan or  search on metacpan

lib/ClamAV/Client.pm  view on Meta::CPAN

    my $scanner = ClamAV::Client->new(
        socket_host     => '127.0.0.1',
        socket_port     => 3310
    );
    
    die("ClamAV daemon not alive")
        if not defined($scanner) or not $scanner->ping();

=head2 Daemon maintenance

    my $version = $scanner->version;

lib/ClamAV/Client.pm  view on Meta::CPAN


=over

=item B<ping>: RETURNS SCALAR; THROWS ClamAV::Client::Error

Returns B<true> ('PONG') if the ClamAV daemon is alive.  Throws a
ClamAV::Client::Error exception otherwise.

=cut

sub ping {

 view all matches for this distribution


Clamd

 view release on metacpan or  search on metacpan

lib/Clamd.pm  view on Meta::CPAN

    return bless \%options, $class;
}

=head2 ping()

Pings the clamd to check it is alive. Returns true if it is
alive, false if it is dead. Note that it is still possible for
a race condition to occur between your test for ping() and
any call to scan(). See below for more details.

=cut

 view all matches for this distribution


Class-Abstract

 view release on metacpan or  search on metacpan

t/edge_cases.t  view on Meta::CPAN

	my $weak   = $strong;
	weaken($weak);

	diag 'weak ref: ' . (defined($weak) ? ref($weak) : 'undef') if $ENV{TEST_VERBOSE};

	# $weak is still alive because $strong holds a strong reference
	ok defined($weak) && blessed($weak),
		'precondition: weakened ref is still alive (strong ref holds it)';

	# A live weakened blessed ref must be accepted by new()
	lives_ok { $strong->new() }
		'live weakened blessed ref: new() succeeds via strong ref';

 view all matches for this distribution


Class-DBI-ViewLoader

 view release on metacpan or  search on metacpan

lib/Class/DBI/ViewLoader.pm  view on Meta::CPAN


# disconnect current DBI handle, if any
sub _clear_dbi_handle {
    my $self = shift;

    return $self if $self->_keepalive;

    if (defined $self->{_dbh}) {
	delete($self->{_dbh})->disconnect;
    }

lib/Class/DBI/ViewLoader.pm  view on Meta::CPAN


    $self->_clear_dbi_handle;
}

# switch to disable _clear_dbi_handle
sub _set_keepalive {
    my $self = shift;
    $self->{__keepalive} = shift;
    return $self;
}

# check status of switch
sub _keepalive {
    my $self = shift;
    return $self->{__keepalive};
}

=head2 set_namespace

    $obj = $obj->set_namespace($namespace)

lib/Class/DBI/ViewLoader.pm  view on Meta::CPAN

This is the cleanup method for the object's DBI handle. It is called whenever
the DBI handle needs to be closed down. i.e. when a new handle is used or the
object goes out of scope. Subclasses should override this method if they need to
clean up any state data that relies on the current database connection, like
statement handles for example. If you don't want the handle that the object is
using to be disconnected, use the _set_keepalive method.

    sub _clear_dbi_handle {
	my $self = shift;

	delete $self->{statement_handle};

lib/Class/DBI/ViewLoader.pm  view on Meta::CPAN

This method is used to attach a DBI handle to the object. It might prove useful
to use this method in order to use an existing database connection in the loader
object. Note that unlike set_dsn, calling this method directly will not cause an
appropriate driver to be loaded. See _load_driver for that.

=head2 _set_keepalive

    $obj = $obj->_set_keepalive($bool)

When set to true, the database handle used by the object won't be disconnected automatically.

=head2 _load_driver

 view all matches for this distribution


Class-Data-Localize

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


During programming I'm sometimes looking for an uncommon solution.
Before it becomes realized it is often not needed anymore, because there
is another way to do it, but the idea is still alive and to wants become real.

The result of one similar situation is this module and now it is possible
to have local Class::Data I will use from time to time.

Maybe someone else has a practical use for this too.

 view all matches for this distribution


Class-EHierarchy

 view release on metacpan or  search on metacpan

CHANGELOG  view on Meta::CPAN

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


Class-Enumeration

 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


Class-Meta

 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


Class-Object

 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


Class-Rebirth

 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


ClickHouse-Encoder

 view release on metacpan or  search on metacpan

eg/migrate_with_transform.pl  view on Meta::CPAN

    return undef if !defined $row->[0];
    $row->[1] = uc($row->[1]) if defined $row->[1];
    return $row;
};

# Long-lived sink: bulk_inserter pools an HTTP::Tiny with keep-alive
# and auto-flushes at batch_size.
my $bi = ClickHouse::Encoder->bulk_inserter(
    host       => $dst_host, port => $dst_port,
    table      => $dst_tbl,
    columns    => \@columns,

 view all matches for this distribution


ClickHouse

 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


Clone

 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


CodeManager

 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


Cogwheel

 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


Colouring-In-XS

 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


Compress-Stream-Zstd

 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


Compress-Zstd

 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


Concierge-Sessions

 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


Concurrent-Object

 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


Config-ApacheFormat

 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


Config-Format-Ini

 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


Config-General-Hierarchical

 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


Config-Model-LcdProc

 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


Config-Model-OpenSsh

 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


Config-Model-Systemd

 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


Config-Model

 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


( run in 1.884 second using v1.01-cache-2.11-cpan-df04353d9ac )