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


CatalystX-ExtJS-Direct

 view release on metacpan or  search on metacpan

t/script/myapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = $ENV{CATALYST_PORT} || 3000;
my $keepalive         = 0;
my $restart           = $ENV{CATALYST_RELOAD} || 0;
my $restart_delay     = 1;
my $restart_regex     = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$';
my $restart_directory = undef;
my $follow_symlinks   = 0;

t/script/myapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s@' => \$restart_directory,
    'followsymlinks'      => \$follow_symlinks,

t/script/myapp_server.pl  view on Meta::CPAN

require MyApp;

MyApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    follow_symlinks   => $follow_symlinks,

t/script/myapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-ExtJS-REST

 view release on metacpan or  search on metacpan

t/script/myapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = $ENV{CATALYST_PORT} || 3000;
my $keepalive         = 0;
my $restart           = $ENV{CATALYST_RELOAD} || 0;
my $restart_delay     = 1;
my $restart_regex     = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$';
my $restart_directory = undef;
my $follow_symlinks   = 0;

t/script/myapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s@' => \$restart_directory,
    'followsymlinks'      => \$follow_symlinks,

t/script/myapp_server.pl  view on Meta::CPAN

require MyApp;

MyApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    follow_symlinks   => $follow_symlinks,

t/script/myapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-ExtJS

 view release on metacpan or  search on metacpan

example/script/myapp_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


CatalystX-I18N

 view release on metacpan or  search on metacpan

t/testapp/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = $ENV{TESTAPP_PORT} || $ENV{CATALYST_PORT} || 3000;
my $keepalive         = 0;
my $restart           = $ENV{TESTAPP_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
my $restart_delay     = 1;
my $restart_regex     = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.pm)$';
my $restart_directory = undef;
my $follow_symlinks   = 0;

t/testapp/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s@' => \$restart_directory,
    'followsymlinks'      => \$follow_symlinks,

t/testapp/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    follow_symlinks   => $follow_symlinks,

t/testapp/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-InjectModule

 view release on metacpan or  search on metacpan

t/script/myapp_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


CatalystX-ListFramework

 view release on metacpan or  search on metacpan

t/lib/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = 3000;
my $keepalive         = 0;
my $restart           = 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;
my $background        = 0;

t/lib/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s'  => \$restart_directory,
    'daemon'              => \$background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    background        => $background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-Menu-Suckerfish

 view release on metacpan or  search on metacpan

t/lib/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = 3000;
my $keepalive         = 0;
my $restart           = 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;
my $background        = 0;

t/lib/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s'  => \$restart_directory,
    'daemon'              => \$background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    background        => $background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-Menu-Tree

 view release on metacpan or  search on metacpan

t/lib/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = 3000;
my $keepalive         = 0;
my $restart           = 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;
my $background        = 0;

t/lib/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s'  => \$restart_directory,
    'daemon'              => \$background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    background        => $background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-Menu-mcDropdown

 view release on metacpan or  search on metacpan

t/lib/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = 3000;
my $keepalive         = 0;
my $restart           = 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;
my $background        = 0;

t/lib/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s'  => \$restart_directory,
    'daemon'              => \$background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    background        => $background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-Plugin-Blurb

 view release on metacpan or  search on metacpan

t/lib/script/testapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = 3000;
my $keepalive         = 0;
my $restart           = 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;
my $background        = 0;

t/lib/script/testapp_server.pl  view on Meta::CPAN

    'debug|d'             => \$debug,
    'fork'                => \$fork,
    'help|?'              => \$help,
    'host=s'              => \$host,
    'port=s'              => \$port,
    'keepalive|k'         => \$keepalive,
    'restart|r'           => \$restart,
    'restartdelay|rd=s'   => \$restart_delay,
    'restartregex|rr=s'   => \$restart_regex,
    'restartdirectory=s'  => \$restart_directory,
    'daemon'              => \$background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

require TestApp;

TestApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
    background        => $background,

t/lib/script/testapp_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -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 -restartdelay  delay between file checks
   -rr -restartregex  regex match files that trigger
                      a restart when modified

 view all matches for this distribution


CatalystX-Script-Server-Starman

 view release on metacpan or  search on metacpan

lib/CatalystX/Script/Server/Starman.pm  view on Meta::CPAN


extends 'Catalyst::Script::Server';

has '+fork' => ( default => 1, init_arg => undef );

has [qw/ keepalive restart restart_delay restart_regex restart_directory/] => ( init_arg => undef, is => 'ro' );

has workers => (
    isa => Int,
    is => 'ro',
    default => 5,

 view all matches for this distribution


Catmandu-CrossRef

 view release on metacpan or  search on metacpan

t/00-load.t  view on Meta::CPAN

        fmt => "unixref",
        doi => "10.1088/1126-6708/2009/03/112",
        usr => 'me@example.com',
    );
}
"I'm alive";
lives_ok {
    $pkg->new(
        doi => "10.1088/1126-6708/2009/03/112",
        usr => 'me@example.com',
    );
}
"I'm alive";

my $importer = $pkg->new(
    fmt => "unixref",
    doi => "10.1088/1126-6708/2009/03/112",
    usr => 'me@example.com',

 view all matches for this distribution


Catmandu-DBI

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/DBI.pm  view on Meta::CPAN

Optional. A password for connecting to the database

=item timeout

Optional. Timeout for a inactive database handle. When timeout is reached, Catmandu
checks if the connection is still alive (by use of ping) or it recreates the connection.
See TIMEOUTS below for more information.

=item reconnect_after_timeout

Optional. When a timeout is reached, Catmandu reconnects to the database. By

 view all matches for this distribution


Catmandu-Inspire

 view release on metacpan or  search on metacpan

t/00-load.t  view on Meta::CPAN

}
require_ok $pkg;

dies_ok { $pkg->new( fmt => 'endnote' ) } "die of missing arguments";
dies_ok {$pkg->new(id => '811388', fmt => 'mods')} "invalid format";
lives_ok { $pkg->new( doi => '10.1088/1126-6708/2009/03/112' ) } "I'm alive";
lives_ok { $pkg->new( id  => '811388' ) } "I'm alive";
lives_ok { $pkg->new( query => "hadronization" ) } "I'm alive";

done_testing;

 view all matches for this distribution


Catmandu-OAI

 view release on metacpan or  search on metacpan

lib/Catmandu/Importer/OAI.pm  view on Meta::CPAN

  } or croak $@;
}

sub _build_oai {
    my ($self) = @_;
    my $agent = HTTP::OAI::Harvester->new(baseURL => $self->url, resume => 0, keep_alive => 1);
    if( $self->has_username && $self->has_password ) {
        my $uri = URI->new( $self->url );
        my @credentials = (
            $uri->host_port,
            $self->realm || undef,

 view all matches for this distribution


Catmandu-Solr

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/Solr.pm  view on Meta::CPAN

    my $hits = $store->bag->search(query => 'name:Patrick');

=cut

has url        => (is => 'ro', default => sub {'http://localhost:8983/solr'});
has keep_alive => (is => 'ro', default => sub {0});
has solr    => (is => 'lazy');
has bag_key => (is => 'lazy', alias => 'bag_field');
has on_error => (
    is  => 'ro',
    isa => sub {

lib/Catmandu/Store/Solr.pm  view on Meta::CPAN

    WebService::Solr->new(
        $_[0]->url,
        {
            autocommit     => 0,
            default_params => {wt => 'json'},
            agent => LWP::UserAgent->new(keep_alive => $self->keep_alive),
        }
    );
}

sub _build_bag_key {

 view all matches for this distribution


Catmandu-Store-CHI

 view release on metacpan or  search on metacpan

t/01-store.t  view on Meta::CPAN

isnt $bag->count, 1, "Count bag size";

$bag->add({ _id => '123' , foo => "bar"});

my $bag2 = $store->bag;
is $bag2->count , 1 , "Bags stay alive";

my $bag3 = $store->bag('foo');
ok ! $bag3->get('123') , "foo doesnt have 123";

done_testing 27;

 view all matches for this distribution


Catmandu-Store-Datahub

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN

    builder => '_build_access_token'
);

sub _build_client {
    my $self = shift;
    return LWP::UserAgent->new(keep_alive => 1);
}

sub _build_access_token {
    my $self = shift;
    return $self->generate_token();

 view all matches for this distribution


Catmandu

 view release on metacpan or  search on metacpan

t/Catmandu-Store-Hash.t  view on Meta::CPAN

isnt $bag->count, 1, "Count bag size";

$bag->add({_id => '123', foo => "bar"});

my $bag2 = $store->bag;
is $bag2->count, 1, "Bags stay alive";

my $bag3 = $store->bag('foo');
ok !$bag3->get('123'), "foo doesnt have 123";

done_testing;

 view all matches for this distribution


Centrifugo-Client

 view release on metacpan or  search on metacpan

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

	
 $cclient->subscribe( channel => 'my-channel&' );
 $cclient->subscribe( channel => 'public-channel' );
 $cclient->subscribe( channel => '$private' );

 # Now start the event loop to keep the program alive
 AnyEvent->condvar->recv;
	
=head1 DESCRIPTION

This library allows to communicate with Centrifugo through a websocket.

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


	my $client = Centrifugo::Client->new( $URL,
	   debug => 'true',          # If true, some informations are written on STDERR
	   debug_ws => 'true',       # If true, all web socket messages are written on STDERR
	   authEndpoint => "...",    # The full URL used to ask for a key to subscribe to private channels
	   max_alive_period => 30,   # interval (in s) since last communication with server that triggers a PING (default 0)
	   refresh_period => 5,      # Check frequency for max_alive_period (default 10s)
	   retry => 0.5 ,            # interval (in ms) between reconnect attempts which value grows exponentially (default 1.0)
	   max_retry => 30,          # upper interval value limit when reconnecting. (default 30)
	   resubscribe => 'true',    # automatic resubscribing on subscriptions (default: 'true')
	   recover => 'true',        # Recovers the lost messages after a reconnection (default: 'false')
	   ws_params => {            # These parameters are passed to AnyEvent::WebSocket::Client->new(...)

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

	$this->{WS_URL} = $ws_url;
	$this->{DEBUG} = $params{debug} && $params{debug}!~/^(0|false|no)$/i; delete $params{debug};
	$this->{DEBUG_WS} = $params{debug_ws} && $params{debug_ws}!~/^(0|false|no)$/i; delete $params{debug_ws};
	$this->{AUTH_URL} = delete $params{authEndpoint} || "/centrifuge/auth/";
	$this->{WEBSOCKET} = AnyEvent::WebSocket::Client -> new( %{$params{ws_params}} ); delete $params{ws_params};
	$this->{MAX_ALIVE} = delete $params{max_alive_period} || 0;
	$this->{REFRESH} = delete $params{refresh_period} || 10;
	$this->{RETRY} = delete $params{retry} || 1;
	$this->{MAX_RETRY} = delete $params{max_retry} || 30;
	$this->{RESUBSCRIBE} = ! defined $params{resubscribe} || $params{resubscribe}!~/^(0|false|no)$/i; delete $params{resubscribe};
	$this->{RECOVER} = $params{recover} && $params{recover}!~/^(0|false|no)$/i; delete $params{recover};

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

	# on Connect, the client_id must be read (if available)
	if ($body && ref($body) eq 'HASH' && $body->{client}) {
		$this->{CLIENT_ID} = $body->{client};
		$this->_debug( "Centrifugo::Client : CLIENT_ID=".$this->{CLIENT_ID} );
	}
	$this->_init_keep_alive_timer() if $this->{MAX_ALIVE};
	$this->_reset_reconnect_sequence();
	$this->_resubscribe() if $this->{RESUBSCRIBE};
}

# This function is called when client receives a message

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

sub _on_close {
	my ($this, $message) = @_;
	$message="(none)" unless $message;
	$this->_debug( "Centrifugo::Client : Connection closed, reason=$message" );
	$this->{ON}->{'ws_closed'}->($message) if $this->{ON}->{'ws_closed'};
	undef $this->{_alive_handler};
	undef $this->{WSHANDLE};
	undef $this->{CLIENT_ID};
	delete $this->{_subscribed_channels};
	delete $this->{_pending_subscriptions};
	$this->_reconnect();

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


# This function is called once for each message received from Centrifugo
sub _on_ws_message {
	my ($this, $message) = @_;
	$this->_debug_ws("Send > WebSocket : $message->{body}");
	$this->{_last_alive_message} = time();
	my $fullbody = decode_json($message->{body}); # The body of websocket message
	# Handle a body containing {response} : converts into a singleton
	if (ref($fullbody) eq 'HASH') {
		$fullbody = [ $fullbody ];
	}

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

		}
	);
}

# Creates the timer to send periodic ping
sub _init_keep_alive_timer {
	my ($this) = @_;
	$this->{_alive_handler} = AnyEvent->timer(
		after => $this->{REFRESH},
		interval => $this->{REFRESH},
		cb => sub {
			my $late = time() - $this->{_last_alive_message};
			if ($late > $this->{MAX_ALIVE}) {
				$this->_debug( "Sending ping (${late}s without message)" );
				$this->ping();
			}
		}

 view all matches for this distribution


Cfn

 view release on metacpan or  search on metacpan

lib/Cfn/Resource/AWS/CloudFront/Distribution.pm  view on Meta::CPAN

  use MooseX::StrictConstructor;
  extends 'Cfn::Value::TypedValue';
  
  has HTTPPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
  has HTTPSPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
  has OriginKeepaliveTimeout => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
  has OriginProtocolPolicy => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
  has OriginReadTimeout => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
  has OriginSSLProtocols => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
}

 view all matches for this distribution


Champlain

 view release on metacpan or  search on metacpan

examples/capitals.pl  view on Meta::CPAN

		# Read the content		
		my $line;
		my $n = $self->http->read_entity_body($line, 1024);
		$content .= $line;
		
		if ($self->http->keep_alive) {
			# In the case where the HTTP request has keep-alive we need to see if the
			# content has all arrived as read_entity_body() will not tell when the end
			# of the content has been reached.
			return TRUE unless length($content) == $headers{'Content-Length'};
		}
		elsif ($n) {

 view all matches for this distribution


Chandra

 view release on metacpan or  search on metacpan

examples/splash_example.pl  view on Meta::CPAN

# (setActivationPolicy, finishLaunching, etc.) which is required
# before any child windows will display.
my $wv = $app->webview;
$wv->init;

# Non-blocking event loop pump — call repeatedly to keep GUI alive
sub pump { $wv->loop(0) for 1..5 }

# Pump + sleep helper
sub pump_sleep {
    my ($secs) = @_;

 view all matches for this distribution


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-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


( run in 1.834 second using v1.01-cache-2.11-cpan-39bf76dae61 )