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


CWB

 view release on metacpan or  search on metacpan

lib/CWB/CQP.pm  view on Meta::CPAN

=cut

sub DESTROY {
  my $self = shift;
  my $pid = $self->{'pid'};
  my $alive = delete $Child{$pid}; # remove from list of children so no longer caught by signal handler
  
  if ($alive && $self->{'command'}) {
    while ($self->_update) {} # read pending output from active command
  }
  my $out = $self->{'out'};
  if (defined $out) {
    $out->print("exit")         # exit CQP backend
      if $alive;
    $out->close;
  }
  my $in = $self->{'in'};
  if (defined $in) {
    $in->close;

 view all matches for this distribution


Cache-LRU-WithExpires

 view release on metacpan or  search on metacpan

t/01_simple.t  view on Meta::CPAN

use warnings;
use Test::More;
use Cache::LRU::WithExpires;
use Time::HiRes qw(sleep);

subtest 'avalivele' => sub {
    my $cache = Cache::LRU::WithExpires->new;
    $cache->set('foo', 'bar', 1);
    is $cache->get('foo'), 'bar';
};

 view all matches for this distribution


Cache-Memcached-Fast

 view release on metacpan or  search on metacpan

lib/Cache/Memcached/Fast.pm  view on Meta::CPAN


Note that for commands that communicate with more than one server
(like L</get_multi>) the timeout applies per server set, not per each
server.  Thus it won't expire if one server is quick enough to
communicate, even if others are silent.  But if some servers are dead
those alive will finish communication, and then dead servers would
timeout.

=item I<close_on_error>

  close_on_error => 0

 view all matches for this distribution


Cache-Memcached-Managed

 view release on metacpan or  search on metacpan

lib/Cache/Memcached/Managed.pm  view on Meta::CPAN


#---------------------------------------------------------------------------
# dead
#
# Cycles through all of the available memcached servers and checks whether
# they are alive or not.  Returns all of the memcached servers that seem to
# be inactive.
#
#  IN: 1 instantiated object
#      2 timeout to apply (default: 10 seconds)
# OUT: 1..N memcached servers that did not reply (in time)

lib/Cache/Memcached/Managed.pm  view on Meta::CPAN

Support for the new "flush_all" memcached action to invalidate all data in
a cache in one fell swoop.

=head2 dead memcached server detection

An easy way to check whether all related memcached servers are still alive.

=head2 starting/stopping memcached servers

Easy start / stop of indicated memcached servers, mainly intended for
development and testing environments.

 view all matches for this distribution


Cairo

 view release on metacpan or  search on metacpan

CairoFt.xs  view on Meta::CPAN

	} else {
		croak("'%s' is not of type Font::FreeType::Face",
		      SvPV_nolen (face));
	}
	RETVAL = cairo_ft_font_face_create_for_ft_face (real_face, load_flags);
	/* Keep the face SV (and thus the FT_Face) alive long enough */
	SvREFCNT_inc (face);
	status = cairo_font_face_set_user_data (RETVAL, &face_key, face,
	                                        face_destroy);
	if (status) {
		warn ("Couldn't install a user data handler, "

 view all matches for this distribution


Cantella-Worker

 view release on metacpan or  search on metacpan

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN

        worker_process_stdout => '_worker_process_stdout',
        worker_process_stderr => '_worker_process_stderr',
        worker_process_sig_chld => '_worker_process_sig_chld',
      } ],
    inline_states => {
      _keep_alive => sub {
        $_[KERNEL]->delay(_keep_alive => 1000);
      },
      sig_term => sub {
        my ($kernel) = $_[KERNEL];
        $kernel->yield('shutdown');
        $kernel->sig_handled;

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN

  $kernel->sig(TERM => 'sig_term');
  $kernel->sig(USR1 => 'sig_usr1');
  $kernel->sig(USR2 => 'sig_usr2');
  $heap->{spawn_workers} = 1;

  $kernel->delay(_keep_alive => 1000);
  $kernel->yield('spawn_workers');
}

sub _pause {
  my ($self, $kernel, $heap) = @_[OBJECT, KERNEL, HEAP];

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN


=item B<workers> - accessor

=back

Read-write integer. The maximum number of subprocesses to have alive at any one
time. Defaults to 5.

=head2 max_worker_age

=over 4

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN


=item B<return value:> C<$number_of_live_children>

=back

Returns the number of children workers that are still alive.

=head2 worker_wheels

=over 4

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN


=item B<return value:> none

=back

If the worker process working under $wheel_id is still alive, send a sig TERM

=head2 _worker_process_close

=over 4

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN

=item B<return value:> none

=back

Once a sig CHLD comes back from a worker, this event will schedule a
C<spawn_workers> event to make sure there's enough workers alive.

=head2 _worker_process_stdout

=over 4

lib/Cantella/Worker/Manager/Prefork.pm  view on Meta::CPAN


=head1 OTHER EVENTS

=over 4

=item B<_keep_alive> - Used to keep the session alive while paused. Does nothing
other than schedule the next keep alive_1000 seconds away.

=item B<sig_int> - mark sig INT as handled and yield to C<shutdown>

=item B<sig_term> - mark sig TERM as handled and yield to C<shutdown>

 view all matches for this distribution


Captcha-Peoplesign

 view release on metacpan or  search on metacpan

lib/Captcha/Peoplesign.pm  view on Meta::CPAN

    return { is_valid => 0, error => $status }
        if $status eq 'badHTTPResponseFromServer';

    # If $status is invalidChallengeSessionID we can not allow the user to pass.
    # It's highly unusual for this to occur, and probably means the
    # peoplesignSession expired and the client session was still alive.
    # We now abandon this client session. This will trigger a new client session
    # and a new peoplesign session.
    return { is_valid => 0, error => $status . ' [' .$self->_get_caller_info_string() . ']' }
        if $status eq 'invalidChallengeSessionID';
        

 view all matches for this distribution


Captive-Portal

 view release on metacpan or  search on metacpan

templates/orig/firewall/filter.tt  view on Meta::CPAN


[% UNLESS throttle_ports;    THROW 'throttle_ports undefined in config_file';    END %]
[% UNLESS throttle_seconds;  THROW 'throttle_seconds undefined in config_file';  END %]
[% UNLESS throttle_hitcount; THROW 'throttle_hitcount undefined in config_file'; END %]

# don't throttle already established connections, helps also with http keep-alives
iptables -t filter -A INPUT -p tcp ! --syn -j ACCEPT

#
# ATTENTION: if enabled this will fill you kernel log ring buffer
# use it just for debugging

 view all matches for this distribution


Carrot

 view release on metacpan or  search on metacpan

lib/Carrot/Continuity/Coordination/Episode/Paragraph/FDx2_IO.pm  view on Meta::CPAN

	}
	return(IS_FALSE);
}


sub is_alive
# /type method
# /effect ""
# //parameters
# //returns
#	::Personality::Abstract::Boolean

 view all matches for this distribution


Cassandra-Client

 view release on metacpan or  search on metacpan

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

        } elsif ($error->isa('Cassandra::Client::Error::WriteTimeoutException')) {
            $retry_decision= $self->{retry_policy}->on_write_timeout($statement, $error->cl, $error->write_type, $error->blockfor, $error->received, ($command_info->{retries}||0));
        } elsif ($error->isa('Cassandra::Client::Error::ReadTimeoutException')) {
            $retry_decision= $self->{retry_policy}->on_read_timeout($statement, $error->cl, $error->blockfor, $error->received, $error->data_retrieved, ($command_info->{retries}||0));
        } elsif ($error->isa('Cassandra::Client::Error::UnavailableException')) {
            $retry_decision= $self->{retry_policy}->on_unavailable($statement, $error->cl, $error->required, $error->alive, ($command_info->{retries}||0));
        } else {
            $retry_decision= Cassandra::Client::Policy::Retry::rethrow;
        }

        if ($retry_decision && $retry_decision eq 'retry') {

 view all matches for this distribution


Catalog

 view release on metacpan or  search on metacpan

doc/catalog.texinfo  view on Meta::CPAN

white space characters from time to time to provide a user feedback. When
the action begins a blank page is shown to the user and the status bar of
the navigator shows that some characters are received. 

This feedback serves two purposes : it shows that the action is doing something
and keeps the connection alive so that the HTTP server does not timeout.

@node Catalog template files, SQL template files, Template files introduction, Top
@chapter Catalog template files

@menu

 view all matches for this distribution


Catalyst-ActionRole-ACL

 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


Catalyst-ActionRole-FindViewByIsa

 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


Catalyst-ActionRole-JMS

 view release on metacpan or  search on metacpan

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


Catalyst-Authentication-AuthTkt

 view release on metacpan or  search on metacpan

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

t/MyApp/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,
);

t/MyApp/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,
} );

t/MyApp/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


Catalyst-Authentication-Credential-Facebook

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Credential/Facebook.pm  view on Meta::CPAN

a L<Catalyst::Authentication::User::Hash> (this is a user object from your database - the user table should have a column called "facebook_id", which the authenticated Facebook user is checked against)

=head1 AUTHOR

Jesse Stay
E<lt>jesse@staynalive.comE<gt>
L<http://staynalive.com>

=head1 COPYRIGHT

This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.

 view all matches for this distribution


Catalyst-Authentication-Credential-OpenID

 view release on metacpan or  search on metacpan

t/Consumer/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
   -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


Catalyst-Authentication-Credential-RemoteHTTP

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Credential/RemoteHTTP.pm  view on Meta::CPAN

our $VERSION = '0.05'; # VERSION
our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY

has realm => ( isa => Object, is => 'ro', required => 1 );

has [qw/http_keep_alive defer_find_user/] => ( is => 'ro', default => 0 );
has username_field => ( is => 'ro', default => 'username' );
has password_field => ( is => 'ro', default => 'password' );

has url => ( is => 'ro', required => 1 );

lib/Catalyst/Authentication/Credential/RemoteHTTP.pm  view on Meta::CPAN

        unless ( $self->defer_find_user );

    if ( ref($user_obj) || $self->defer_find_user ) {
        my $ua =
            Catalyst::Authentication::Credential::RemoteHTTP::UserAgent->new(
            keep_alive => $self->http_keep_alive ? 1 : 0 );

        # add prefix/suffix to user data to make auth_user, get password
        my $auth_user = sprintf( '%s%s%s', $self->user_prefix, $username, $self->user_suffix );
        my $password = $authinfo->{ $self->password_field };
        $ua->set_credentials( $auth_user, $password );

lib/Catalyst/Authentication/Credential/RemoteHTTP.pm  view on Meta::CPAN

                            credential => {
                                class => 'RemoteHTTP',
                                url => 'http://intranet.company.com/authenticated.html',
                                password_field => 'password',
                                username_prefix => 'MYDOMAIN\\',
                                http_keep_alive => 1,
                                defer_find_user => 1,
                            },
                            ...
                    },
        },

lib/Catalyst/Authentication/Credential/RemoteHTTP.pm  view on Meta::CPAN

This is an optional suffix to the username, which is added to the
username before it is used for authenticating to the remote http
server. It may be used (for example) to apply a domain to the
authenticated username.

=item http_keep_alive

If C<http_keep_alive> is set then keep_alive is set on the
connections to the remote http server. This is required if you are
using NTLM authentication (since an additional encryption nonce is
passed in the http negotiation). It is optional, but normally
harmless, for other forms of authentication.

lib/Catalyst/Authentication/Credential/RemoteHTTP.pm  view on Meta::CPAN

Finally, if you are using L<NTLM-1.02> then you need to apply the
patch described in RT entry 9521
L<http://rt.cpan.org/Ticket/Display.html?id=9521>.

When using NTLM authentication the configuration option
C<http_keep_alive> must be set true - otherwise the session to the
remote server is not maintained and the authentication nonce will
be lost between sessions.

You may also need to set C<username_prefix> or C<username_suffix>
to set the correct domain for the authentication, unless the

 view all matches for this distribution



Catalyst-Authentication-Store-Htpasswd

 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


Catalyst-Authentication-Store-Tangram

 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


Catalyst-Controller-Atompub

 view release on metacpan or  search on metacpan

samples/MyAtom/script/myatom_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;

samples/MyAtom/script/myatom_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,
);

samples/MyAtom/script/myatom_server.pl  view on Meta::CPAN

require MyAtom;

MyAtom->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
} );

samples/MyAtom/script/myatom_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


Catalyst-Controller-RequestToken

 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


Catalyst-Controller-SOAP

 view release on metacpan or  search on metacpan

t/PostApp/script/postapp_server.pl  view on Meta::CPAN

my $debug             = 0;
my $fork              = 0;
my $help              = 0;
my $host              = undef;
my $port              = $ENV{POSTAPP_PORT} || $ENV{CATALYST_PORT} || 3000;
my $keepalive         = 0;
my $restart           = $ENV{POSTAPP_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
my $restart_delay     = 1;
my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
my $restart_directory = undef;

t/PostApp/script/postapp_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,
);

t/PostApp/script/postapp_server.pl  view on Meta::CPAN

require PostApp;

PostApp->run( $port, $host, {
    argv              => \@argv,
    'fork'            => $fork,
    keepalive         => $keepalive,
    restart           => $restart,
    restart_delay     => $restart_delay,
    restart_regex     => qr/$restart_regex/,
    restart_directory => $restart_directory,
} );

t/PostApp/script/postapp_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


Catalyst-Controller-reCAPTCHA

 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


Catalyst-Devel

 view release on metacpan or  search on metacpan

share/script/myapp_server.pl.tt  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


Catalyst-Engine-HTTP-POE

 view release on metacpan or  search on metacpan

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN

sub BENCH () { $ENV{CATALYST_POE_BENCH} || 0 }

# Max processes (including parent)
sub MAX_PROC () { $ENV{CATALYST_POE_MAX_PROC} || 1 }

# Keep-alive connection timeout in seconds
sub KEEPALIVE_TIMEOUT () { 300 }

# Benchmark::Stopwatch for profiling
if ( BENCH ) {
    require Benchmark::Stopwatch;

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN


                   handle_finalize
                   finalize_done
                   client_done
                   
                   keepalive_timeout
               /
           ],
       ],
   );
   

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN

    
    my $client = $self->{clients}->{$ID} || return;
    
    BENCH && $client->{stopwatch}->lap('read_input');
    
    # Clear the keepalive timeout timer if set
    if ( my $timer = delete $client->{_timeout_timer} ) {
        $kernel->alarm_remove( $timer );
    }
    
    # Read some data from the driver

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN

    my @headers;
    push @headers, "$protocol $status $message";
    
    $c->response->headers->header( Date => HTTP::Date::time2str(time) );

    # Some notes: I found that to get keepalive mode to perform well under ab,
    # I had to send all data in a single put() call, so the second put in write() below is
    # what caused keepalive to be so slow.  Not sure if this is just a quirk with ab
    # or really a performance problem. :(
    
    # Should we keep the connection open?
    my $connection = $c->request->header('Connection');
    if ( $connection && $connection =~ /^keep-alive$/i ) {
        $c->response->headers->header( Connection => 'keep-alive' );
        $client->{_keepalive} = 1;
    }
    else {
        $c->response->headers->header( Connection => 'close' );
    }
    

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN

    
    my $client = $self->{clients}->{$ID} || return;
    
    BENCH && warn "[$ID] [$$] Stopwatch:\n" . $client->{stopwatch}->stop->summary;

    # clean up everything about this client unless we are using keepalive
    if ( $client->{_keepalive} ) {
        DEBUG && warn "[$ID] [$$] client_done, keepalive enabled, waiting for more requests\n";
        $client->{requests}++;
        
        # Clear important variables from the previous state
        delete $client->{_headers};
        delete $client->{_written};

lib/Catalyst/Engine/HTTP/POE.pm  view on Meta::CPAN

        if ( BENCH ) {
            $client->{stopwatch} = Benchmark::Stopwatch->new->start;
        }

        # timeout idle connection after some seconds
        $client->{_timeout_timer} = $kernel->delay_set( 'keepalive_timeout', KEEPALIVE_TIMEOUT, $ID );
    }
    else {
        DEBUG && warn "[$ID] [$$] client_done, closing connection\n";
        delete $self->{clients}->{$ID};
    }
}

sub keepalive_timeout {
    my ( $kernel, $self, $ID ) = @_[ KERNEL, OBJECT, ARG0 ];
    
    DEBUG && warn "[$ID] [$$] Timing out idle keepalive connection\n";
    
    delete $self->{clients}->{$ID};
}

# Process a chunk of body data

 view all matches for this distribution


Catalyst-Engine-HTTP-Prefork

 view release on metacpan or  search on metacpan

lib/Catalyst/Engine/HTTP/Prefork.pm  view on Meta::CPAN

    my $self = shift;
    
    $self->{client} = {
        headerbuf => '',
        inputbuf  => '',
        keepalive => 1,
    };
}

sub process_request {
    my $self = shift;
    my $conn = $self->{server}->{client};

    while ( $self->{client}->{keepalive} ) {
        last if !$conn->connected;
        
        # Read until we see all headers
        last if !$self->_read_headers;
    

lib/Catalyst/Engine/HTTP/Prefork.pm  view on Meta::CPAN

            if $headers->{'X-Forwarded-Host'};
    
        # Determine whether we will keep the connection open after the request
        my $connection = $headers->{Connection};
        if ( $proto && $proto eq 'HTTP/1.0' ) {
            if ( $connection && $connection =~ /^keep-alive$/i ) {
                # Keep-alive only with explicit header in HTTP/1.0
                $self->{client}->{keepalive} = 1;
            }
            else {
                $self->{client}->{keepalive} = 0;
            }
        }
        elsif ( $proto && $proto eq 'HTTP/1.1' ) {
            if ( $connection && $connection =~ /^close$/i ) {
                $self->{client}->{keepalive} = 0;
            }
            else {
                # Keep-alive assumed in HTTP/1.1
                $self->{client}->{keepalive} = 1;
            }
            
            # Do we need to send 100 Continue?
            if ( $headers->{Expect} ) {
                if ( $headers->{Expect} eq '100-continue' ) {

lib/Catalyst/Engine/HTTP/Prefork.pm  view on Meta::CPAN

        # Pass flow control to Catalyst
        $self->{appclass}->handle_request( $self->{client} );
    
        DEBUG && warn "[$$] Request done\n";
    
        if ( $self->{client}->{keepalive} ) {
            # If we still have data in the input buffer it may be a pipelined request
            if ( $self->{client}->{inputbuf} ) {
                if ( $self->{client}->{inputbuf} =~ /^(?:GET|HEAD)/ ) {
                    if ( DEBUG ) {
                        warn "Pipelined GET/HEAD request in input buffer: " 

lib/Catalyst/Engine/HTTP/Prefork.pm  view on Meta::CPAN

                    
                    $self->{client}->{inputbuf} = '';
                }
            }
            
            DEBUG && warn "[$$] Waiting on previous connection for keep-alive request...\n";
            
            my $sel = IO::Select->new($conn);
            last unless $sel->can_read(1);
        }
    }

lib/Catalyst/Engine/HTTP/Prefork.pm  view on Meta::CPAN


Browsers sending any number of pipelined requests will be handled properly.

=head2 Keep-Alive

Keep-alive is supported for both HTTP/1.1 (by default) and HTTP/1.0 (if a
Connection: keep-alive header is present in the request).

=head1 CUSTOMIZATION

Additional options may be passed to the engine by modifying
yourapp_server.pl to send additional items to the run() method.

 view all matches for this distribution


Catalyst-Enzyme

 view release on metacpan or  search on metacpan

t/tutorial/BookShelf/script/bookshelf_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 @argv = @ARGV;

t/tutorial/BookShelf/script/bookshelf_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
);

t/tutorial/BookShelf/script/bookshelf_server.pl  view on Meta::CPAN

require BookShelf;

BookShelf->run( $port, $host, {
    argv          => \@argv,
    'fork'        => $fork,
    keepalive     => $keepalive,
    restart       => $restart,
    restart_delay => $restart_delay,
    restart_regex => qr/$restart_regex/
} );

t/tutorial/BookShelf/script/bookshelf_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 got 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


Catalyst-Helper-AuthDBIC

 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


( run in 3.732 seconds using v1.01-cache-2.11-cpan-df04353d9ac )