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


Gearman-JobScheduler

 view release on metacpan or  search on metacpan

t/gearman.t  view on Meta::CPAN

    my $opts  = { 'die_upon_destroy' => 1 };

    my $proc = Proc::Background->new( $opts, $command );
    sleep( 1 );

    unless( $proc->alive ) {
        $proc = undef;
        die "Process '$command' failed to start.";
    }

    return $proc;

 view all matches for this distribution


Gearman-Server

 view release on metacpan or  search on metacpan

bin/gearmand  view on Meta::CPAN


use vars qw($DEBUG);

$DEBUG = 0;

my ($daemonize, $nokeepalive, $notify_pid, $opt_pidfile, $accept, $wakeup,
    $wakeup_delay, $conf_host,);
my $conf_port = 4730;

Getopt::Long::GetOptions(
    'd|daemonize'    => \$daemonize,

 view all matches for this distribution


Gearman-Spawner

 view release on metacpan or  search on metacpan

t/02-supervisor.t  view on Meta::CPAN

    servers => [Gearman::Spawner::Server->address],
    workers => { },
);

my $pid = $spawner->pid;
ok(kill(0, $pid), 'supervisor is alive');

my $timed_out = 0;
$SIG{ALRM} = sub { $timed_out++ };
alarm 1;
undef $spawner;

 view all matches for this distribution


GearmanX-Worker

 view release on metacpan or  search on metacpan

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


my @urls      : shared = ();         # workers report back here
my @labels    : shared = ();        # workers report task labels here
my $work_cnt  : shared = 0;
my $work_drop : shared = 0;
my $alives    : shared = 0;



sub run_experiment {
    my $deps = shift;

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

    $work_drop = 0;

    warn "== MAIN: $o{nr_workers} =====================================================================================";
    my @workers = map { threads->new(\&Worker::run, "W$_", $o{worker}) } (1.. $o{nr_workers});
    map { $_->detach } @workers;
    $alives = scalar @workers;

    $d->evolve ($o{kick});

    my $start_time = time;
    my $end_time   = $start_time + $o{max_time}; # we plan to work at most some secs on that

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

		warn "MAIN: STRANGE got $url in queue which is not known in Petri";
		next RESPONSE;
	    }
	    $d->evolve ($url);
	}
	warn "MAIN: sleeping a bit with alive $alives";
	sleep 1;

#	$d->evolve ('xxx') if time > $end_time - $loop_time + 2; # 2 secs after start we pretend something else happened

	@gearmandized = grep { $_->{gearmandized}->[0] } map { $d->things ($_) } $d->transitions;

 view all matches for this distribution


Genealogy-Obituary-Lookup

 view release on metacpan or  search on metacpan

bin/create_db.PL  view on Meta::CPAN

	MaxAge => 30 * 24
}) || die "$0: $cache_dir: $!";

print "This will take some time. It'd be best to go and make yourself a cup of tea.\n";

my $ua = $force_flag ? LWP::UserAgent->new(timeout => 60, keep_alive => 1) : LWP::UserAgent::WithCache->new(timeout => 60, keep_alive => 1);
# my $ua = LWP::UserAgent->new(timeout => 60, keep_alive => 1);
$ua->env_proxy(1);
$ua->agent('Mozilla/5.0');
$ua->conn_cache()->total_capacity(undef);
$Lingua::EN::NameCase::POSTNOMINAL = 0;

 view all matches for this distribution


Genealogy-ObituaryDailyTimes

 view release on metacpan or  search on metacpan

bin/create_db.PL  view on Meta::CPAN

	MaxAge => 30 * 24
}) || die "$0: $cache_dir: $!";

print "This will take some time. It'd be best to go and make yourself a cup of tea.\n";

my $ua = LWP::UserAgent::WithCache->new(timeout => 60, keep_alive => 1);
$ua->env_proxy(1);
$ua->agent('Mozilla/5.0');
$ua->conn_cache()->total_capacity(undef);
$Lingua::EN::NameCase::POSTNOMINAL = 0;

 view all matches for this distribution


Genealogy-Occupation

 view release on metacpan or  search on metacpan

t/edge_cases.t  view on Meta::CPAN

	delete local $ENV{LC_ALL};
	delete local $ENV{LC_MESSAGES};
	local $ENV{LANG} = 'en_GB.UTF-8';
	my $guard  = mock_scoped('I18N::LangTags::Detect::detect' => sub { () });
	my $obj    = Genealogy::Occupation->new(%args);
	# Return guard separately so the caller can keep it alive past return
	return ($obj, $guard);
}

# -----------------------------------------------------------------------
# String-cleaning step boundary conditions

 view all matches for this distribution


Genealogy-Wills

 view release on metacpan or  search on metacpan

bin/create_db.PL  view on Meta::CPAN

	Verbose  => 0,
	NoUpdate => 60 * 60 * 24 * 7 * 31,	# The archive never changes
	MaxAge   => 30 * 24
}) || Carp::croak("$0: $cache_dir: $!");

my $ua = LWP::UserAgent::WithCache->new(timeout => 10, keep_alive => 1);
$ua->env_proxy(1);
$ua->agent('Genealogy::Wills');
# $ua->agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36');
$ua->conn_cache()->total_capacity(undef);
$Lingua::EN::NameCase::POSTNOMINAL = 0;

 view all matches for this distribution


Geneos-API

 view release on metacpan or  search on metacpan

lib/Geneos/API.pm  view on Meta::CPAN

            # XML-RPC API options:
            raise_error => 1,
        },
        ua  => {
            # UserAgent options:
            keep_alive => 20,
            timeout => 60,
        },
    });

=head4 B<api> - XML-RPC options

lib/Geneos/API.pm  view on Meta::CPAN


=item * C<< any options supported by L<LWP::UserAgent> >>

=back

If no LWP::UserAgent options are passed to the constructor, the keep alive will be enabled with the total capacity of 10. In other words, the two calls below are identical:

    $api = Geneos::API->new("http://localhost:7036/xmlrpc")

    # is identical to
    $api = Geneos::API->new("http://localhost:7036/xmlrpc", {
        ua  => {
            keep_alive => 10,
        },
    });

    # but different to (keep alive disabled):
    $api = Geneos::API->new("http://localhost:7036/xmlrpc", {
        ua  => {},
    });

Note that if you pass the LWP::UserAgent options, the keep alive default won't be applied:

    # keep alive is not enabled
    $api = Geneos::API->new("http://localhost:7036/xmlrpc", {
        ua  => {
            timeout => 300,
        },
    });

Examples:

    # sets http timeout to 30 seconds and implicitly disables keep alive:
    $api = Geneos::API->new("http://example.com:7036/xmlrpc", {
        ua => {
           timeout=>30,
        },
    });

lib/Geneos/API.pm  view on Meta::CPAN

    #
    # * '-', '(' and ')' characters may be used in the method names
    # * the values do not default to type 'string'
    #
    # Among other reasons, ensuring that HTTP1.1 is used to take advantage
    # of the keep alive feature supported by Geneos XML-RPC server
    #
    ########################################################################

    package Geneos::API::XMLRPC;

lib/Geneos/API.pm  view on Meta::CPAN

        else {
            # init the options
            $opts ||= {};
        }

        # enable keep alive by default
        $opts->{ua} ||= {keep_alive=>DEFAULT_TOTAL_CAPACITY,};

        # no api options are set by default
        $opts->{api} ||= {};

        $self->{_xmlrpc} = Geneos::API::XMLRPC->new($url, $opts);

 view all matches for this distribution


Gentoo-Perl-Distmap

 view release on metacpan or  search on metacpan

corpus/distmap.json  view on Meta::CPAN

         "versions_gentoo" : [
            "1.051"
         ]
      }
   ],
   "POE-Component-Client-Keepalive" : [
      {
         "category" : "dev-perl",
         "package" : "POE-Component-Client-Keepalive",
         "repository" : "perl-experimental",
         "versions_gentoo" : [
            "0.271.0"
         ]
      }

 view all matches for this distribution


Gentoo-Probe

 view release on metacpan or  search on metacpan

t/sandbox/usr/portage/app-shells/csh/files/mksignames.c  view on Meta::CPAN


#if defined (SIGGRANT)	/* HFT monitor mode granted */
  signal_names[SIGGRANT] = "SIGGRANT";
#endif

#if defined (SIGKAP)	/* keep alive poll from native keyboard */
  signal_names[SIGKAP] = "SIGKAP";
#endif

#if defined (SIGRETRACT) /* HFT monitor mode retracted */
  signal_names[SIGRETRACT] = "SIGRETRACT";

 view all matches for this distribution


Geo-Cache

 view release on metacpan or  search on metacpan

t/sample.gpx  view on Meta::CPAN

        </groundspeak:log>
        <groundspeak:log id="1587729">
          <groundspeak:date>2003-06-21T07:00:00</groundspeak:date>
          <groundspeak:type>Didn't find it</groundspeak:type>
          <groundspeak:finder id="27639">RGS</groundspeak:finder>
          <groundspeak:text encoded="False">Now I know why this is called Skeeter Mtn. We got here just about dark and we were eaten alive. We searched the 2 obvious areas based on the hint and came up with nothing, just like the previous 2 cachers. ...

RGS
St. Louis</groundspeak:text>
        </groundspeak:log>
        <groundspeak:log id="1471480">

 view all matches for this distribution


Geo-Cloudmade

 view release on metacpan or  search on metacpan

lib/Geo/Cloudmade.pm  view on Meta::CPAN

=cut
sub new {
  my ($class, $key) = @_;
  bless {
      key => $key,
      ua => LWP::UserAgent->new( keep_alive => 2 ),
      error => '',
      http_status => 0,
  }, $class
}

 view all matches for this distribution


Geo-Coder-Free

 view release on metacpan or  search on metacpan

createdatabase.PL  view on Meta::CPAN


my $current_state;
my $current_country;
# my %whosonfirst;

my $ua = LWP::UserAgent::Throttled->new(keep_alive => 1);
$ua->conn_cache(LWP::ConnCache->new());
$ua->throttle({ 'api.zippopotam.us' => 1 });
$ua->env_proxy(1);

$filename = 'downloads/allCountries.txt';

 view all matches for this distribution


Geo-Coder-US

 view release on metacpan or  search on metacpan

US/Import.pm  view on Meta::CPAN

it might be faster for you to just download a binary version of the
fully imported database. 

Right now, I can't afford to make the full 750 megabyte database freely
downloadable from my website -- the bandwidth charges would eat me
alive. Contact me if you can offer funding or mirroring.

=head1 SEE ALSO

Geo::Coder::US(3pm), Geo::StreetAddress::US(3pm), Geo::TigerLine(3pm),
Geo::Fips55(3pm), DB_File(3pm), Archive::Zip(3pm)

 view all matches for this distribution


Geo-GDAL

 view release on metacpan or  search on metacpan

index.dox  view on Meta::CPAN


GDAL maintains its own reference counting but this is largely lost in
the bindings.

The Perl bindings attempt to maintain these dependencies by keeping
the parent objects alive under the hood, independent of their existence
in the user space. Thus it is perfectly legal to do something like

\code
my $layer = Geo::OGR::Driver('Memory')->
    Create()->

 view all matches for this distribution


Geo-ICAO

 view release on metacpan or  search on metacpan

share/icao.data  view on Meta::CPAN

LFIM|Saint-Gaudens Montrejeau Airport|Saint-Gaudens
LFIO|Toulouse-Montaudran Airport|Toulouse-Montaudran
LFIP|Peyresourde Balestas Airport|Peyresourde
LFIR|Revel Montgey Airport|Revel
LFIT|Toulouse Bourg-Saint-Bernard Airport|Toulouse
LFIV|Vendays-Montalivet Airport|Vendays-Montalivet
LFIX|Itxassou Airport|Itxassou
LFIY|Saint-Jean-d'Angély Airport|Saint-Jean-d'Angély
LFJA|Chaumont Semoutiers Airport|Chaumont
LFJB|Mauléon Airport|Mauléon
LFJC|Clamecy Airport|Clamecy

 view all matches for this distribution


Geo-Routing

 view release on metacpan or  search on metacpan

lib/Geo/Routing/Role/Driver.pm  view on Meta::CPAN

    );

    $mech->default_header(
        'Accept-Encoding' => "gzip,deflate",
        'Keep-Alive' => "300",
        'Connection' => "keep-alive",
    );

    return $mech;
}

 view all matches for this distribution


Gepok

 view release on metacpan or  search on metacpan

lib/Gepok.pm  view on Meta::CPAN

# response and send it to client.
sub _finalize_response {
    my($self, $env, $res, $sock) = @_;

    if ($env->{'psgix.harakiri.commit'}) {
        $self->{_client_keepalive} = 0;
        $self->{_client_harakiri}  = 1;
    }

    my $server_proto = $env->{SERVER_PROTOCOL};
    my $client_proto = $self->{_client_proto};

lib/Gepok.pm  view on Meta::CPAN


    if (!$headers{date}) {
        push @headers, "Date: " . time2str(time());
    }

    my $keepalive;
    if ($env->{HTTP_CONNECTION}) {
        $keepalive = $env->{HTTP_CONNECTION} =~ /alive/i ? 1:0;
    }
    # default is keep-alive for HTTP/1.1, but close for HTTP/1.0
    $keepalive //= ($client_proto eq 'HTTP/1.1' ? 1:0);
    # normally HTTP::Daemon prints this, but we're not sending response using
    # HTTP::Daemon
    push @headers, "Connection: ".($keepalive ? "Keep-Alive" : "Close");

    my $chunked;
    my $cl = $headers{'content-length'};
    if ($client_proto eq 'HTTP/1.1') {
        if ($status =~ /^[123]/ && $status != 304 && (!defined($cl) || $cl)) {

lib/Gepok.pm  view on Meta::CPAN

        $chunked = 0;
    }
    push @headers, "Transfer-Encoding: chunked" if $chunked;
    $self->{_chunked} = $chunked;

    #warn "chunked=$chunked, keep-alive=$keepalive, client_proto=$client_proto";

    if ($client_proto le 'HTTP/1.0' && $keepalive && !defined($cl)) {
        # if HTTP/1.0 client requests keep-alive (like Wget), we need
        # Content-Length so client knows when response ends.

        # produce body first so we can calculate content-length
        $self->_finalize_body($env, $res, $sock, 1);
        push @headers, "Content-Length: ".$self->{_res_content_length};

 view all matches for this distribution


Gerrit-Client

 view release on metacpan or  search on metacpan

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

      }
      if ( !$status && $options->{on_success} ) {
        $options->{on_success}->();
      }

      # make sure we stay alive until this callback is executed
      undef $cv;
    }
  );

  return;

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

    $cmdstr = "[@cmd]";
  }

  $cv->cb(
    sub {
      # make sure we stay alive until this callback is executed
      undef $cv;

      my $status = shift->recv();
      if ( $status && $options{on_error} ) {
        $options{on_error}->("$cmdstr exited with status $status");

 view all matches for this distribution


Getopt-Alt

 view release on metacpan or  search on metacpan

t/options-valid.t  view on Meta::CPAN

        , 'interactice|i'
        , 'i=s%'
        , 'itterations|i=i'
        , 'join|j'
        , 'j=s%'
        , 'keepalive|k'
        , 'kill|k'
        , 'kilobyte|k'
        , 'k=s%'
        , 'length|l=i'
        , 'level|l=i'

 view all matches for this distribution


Getopt-Compact-WithCmd

 view release on metacpan or  search on metacpan

t/03_opts.t  view on Meta::CPAN


use Getopt::Compact::WithCmd;

sub test_opts {
    my %specs = @_;
    my ($args, $expects, $desc, $argv, $is_alive, $extra_test)
        = @specs{qw/args expects desc argv is_alive extra_test/};

    subtest $desc => sub {
        @::ARGV = @$argv if $argv;
        my $go = new_ok 'Getopt::Compact::WithCmd', [%$args];

        if ($is_alive) {
            is_deeply +$go->opts, $expects, 'opts';
        }
        else {
            ok stdout_from(sub{ $go->opts }), 'show usage';
        }

t/03_opts.t  view on Meta::CPAN

test_opts(
    args => {},
    expects => {
        help => undef,
    },
    is_alive => 1,
    desc => 'empty params',
);

test_opts(
    args => {
        global_struct => [],
    },
    expects => {
        help => undef,
    },
    is_alive => 1,
    desc => 'with empty global_struct',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => undef,
        help => undef,
    },
    is_alive => 1,
    desc => 'with global_struct (foo)',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => 1,
        help => undef,
    },
    is_alive => 1,
    argv => [qw/--foo/],
    desc => 'with global_struct (foo) / ARGV=--foo',
);

{

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        desc => 'with global_struct (dest foo)',
    );
}

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        extra_test => sub {
            is $foo, 1, 'dest foo';
        },
        desc => 'with global_struct (dest foo)',

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        extra_test => sub {
            is $foo, 1, 'dest foo';
        },
        desc => 'with global_struct (dest foo)',

t/03_opts.t  view on Meta::CPAN

    args => {
        global_struct => [
            [ [qw/f foo/], 'foo', '!' ],
        ],
    },
    is_alive => 0,
    argv => [qw/--hoge/],
    desc => 'with global_struct (foo) / Unknown option',
);

test_opts(
    args => {
        global_struct => [
            [ [qw/f foo/], 'foo', '!' ],
        ],
    },
    is_alive => 0,
    argv => [qw/--help/],
    desc => 'with global_struct (foo) / ARGV=--help',
);

test_opts(

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => undef,
        help => undef,
    },
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / empty ARGV',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => undef,
        bar  => undef,
        help => undef,
    },
    argv => [qw/hoge/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => undef,
        bar  => 1,
        help => undef,
    },
    argv => [qw/hoge --bar/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge --bar',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => 1,
        bar  => 1,
        help => undef,
    },
    argv => [qw/--foo hoge --bar/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=--foo hoge --bar',
);

{
    my $bar;

t/03_opts.t  view on Meta::CPAN

        expects => {
            foo  => 1,
            help => undef,
        },
        argv => [qw/--foo hoge --bar/],
        is_alive => 1,
        extra_test => sub {
            is $bar, 1, 'dest bar';
        },
        desc => 'with global_struct (foo) / command_struct (dest bar) / ARGV=--foo hoge --bar',
    );

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/hoge --help/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge --help',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/help/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=help',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/help hoge/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=help hoge',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                type  => '!',
            },
        },
    },
    argv => [],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => undef,
    },
    desc => 'HASH element',

t/03_opts.t  view on Meta::CPAN

                type  => '!',
            },
        },
    },
    argv => [qw/-f/],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => 1,
    },
    desc => 'alias of SCALAR',

t/03_opts.t  view on Meta::CPAN

                },
            },
        },
    },
    argv => [qw/hoge --bar/],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => undef,
        bar  => 1,
    },

 view all matches for this distribution


Git-Background

 view release on metacpan or  search on metacpan

lib/Git/Background/Future.pm  view on Meta::CPAN


sub _await_if_git_is_done {
    my ($self) = @_;

    my $run = $self->udata('_run');
    if ( defined $run && !$run->{_proc}->alive ) {
        $self->await;
    }

    return;
}

 view all matches for this distribution


Git-Libgit2

 view release on metacpan or  search on metacpan

lib/Git/Libgit2.pm  view on Meta::CPAN


Convert a 40-character hex OID into a Perl scalar holding the raw 20 bytes
(wraps C<git_oid_fromstr>). Croaks unless the input is exactly 40 hex digits.

B<Lifetime:> the returned scalar I<is> the OID buffer — libgit2 is handed a
pointer into its PV. Keep the scalar alive for as long as any libgit2 call
still needs the OID.

=head2 oid_to_hex

    my $hex = oid_to_hex($oid_ptr);

 view all matches for this distribution


Git-Native

 view release on metacpan or  search on metacpan

lib/Git/Native/Blob.pm  view on Meta::CPAN

use Moo;
use Git::Libgit2::FFI ();
use Git::Native::Oid ();

has _handle => ( is => 'ro', required => 1 );
has _owner  => ( is => 'ro', required => 1 );   # Repository - keeps repo alive

has oid => ( is => 'lazy' );
sub _build_oid {
  my $self = shift;
  Git::Native::Oid->from_ptr(

lib/Git/Native/Blob.pm  view on Meta::CPAN

=head1 DESCRIPTION

A libgit2 blob, exposing C<oid>, C<size>, C<content>. Freed when the
object goes out of scope. Obtained from
L<Git::Native::Repository/blob> or L<Git::Native::Repository/object>; the
blob keeps its repository alive for as long as it is itself in scope.

Blobs are created from a Perl scalar with
L<Git::Native::Repository/blob_create_frombuffer>, which returns the OID
rather than a Blob.

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

#define CONNECTION "connection"
#define CONTENT_LENGTH "content-length"
#define TRANSFER_ENCODING "transfer-encoding"
#define UPGRADE "upgrade"
#define CHUNKED "chunked"
#define KEEP_ALIVE "keep-alive"
#define CLOSE "close"


static const char *method_strings[] =
  {

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  , h_content_length
  , h_transfer_encoding
  , h_upgrade

  , h_matching_transfer_encoding_chunked
  , h_matching_connection_keep_alive
  , h_matching_connection_close

  , h_transfer_encoding_chunked
  , h_connection_keep_alive
  , h_connection_close
  };

enum http_host_state
  {

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  if (cond) {                                                        \
    SET_ERRNO(HPE_STRICT);                                           \
    goto error;                                                      \
  }                                                                  \
} while (0)
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
#else
# define STRICT_CHECK(cond)
# define NEW_MESSAGE() start_state
#endif

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN


            parser->content_length = ch - '0';
            break;

          case h_connection:
            /* looking for 'Connection: keep-alive' */
            if (c == 'k') {
              parser->header_state = h_matching_connection_keep_alive;
            /* looking for 'Connection: close' */
            } else if (c == 'c') {
              parser->header_state = h_matching_connection_close;
            } else {
              parser->header_state = h_general;

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

            } else if (parser->index == sizeof(CHUNKED)-2) {
              parser->header_state = h_transfer_encoding_chunked;
            }
            break;

          /* looking for 'Connection: keep-alive' */
          case h_matching_connection_keep_alive:
            parser->index++;
            if (parser->index > sizeof(KEEP_ALIVE)-1
                || c != KEEP_ALIVE[parser->index]) {
              parser->header_state = h_general;
            } else if (parser->index == sizeof(KEEP_ALIVE)-2) {
              parser->header_state = h_connection_keep_alive;
            }
            break;

          /* looking for 'Connection: close' */
          case h_matching_connection_close:

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

              parser->header_state = h_connection_close;
            }
            break;

          case h_transfer_encoding_chunked:
          case h_connection_keep_alive:
          case h_connection_close:
            if (ch != ' ') parser->header_state = h_general;
            break;

          default:

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

        STRICT_CHECK(ch != LF);

        parser->state = s_header_value_lws;

        switch (parser->header_state) {
          case h_connection_keep_alive:
            parser->flags |= F_CONNECTION_KEEP_ALIVE;
            break;
          case h_connection_close:
            parser->flags |= F_CONNECTION_CLOSE;
            break;

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  return 1;
}


int
http_should_keep_alive (const http_parser *parser)
{
  if (parser->http_major > 0 && parser->http_minor > 0) {
    /* HTTP/1.1 */
    if (parser->flags & F_CONNECTION_CLOSE) {
      return 0;

 view all matches for this distribution


Gitalist

 view release on metacpan or  search on metacpan

script/gitalist_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
                      (ignored if you have Linux::Inotify2 installed)
   -rr -restartregex  regex match files that trigger

 view all matches for this distribution


Glib-Ex-ConnectProperties

 view release on metacpan or  search on metacpan

lib/Glib/Ex/ConnectProperties.pm  view on Meta::CPAN


# Hard/weak refs are as follows.
#
# * Readable property in new() permanent linkage -- the $object signal
#   connection has a hard ref to $elem, and $elem->{'self'} has a hard ref
#   to $self, so $elem is kept alive while $object lives.  The entry for
#   $elem within connp $self->{'array'} is weak so that $elem goes away when
#   $object is destroyed.
#
# * Readable property in dynamic() linkage -- $elem->{'self'} is weak, which
#   means $self can be garbage collected.  Each $elem is still kept alive by
#   the signal connection, but $self->DESTROY drops those connections.
#
# * Write-only property -- there's no signal connection, and $self has a
#   hard ref to $elem, with nothing from $elem back to $self.  The
#   write-onlys don't keep $self alive, only the readables.  Once the last
#   readable object is destroyed the $self and write-onlys are destroyed.
#
# In all cases $elem->{'object'} is only a weak ref to the target $object so
# a ConnectProperties never keeps a target object alive.
#
# When $self->{'array'} gets down to just one element (one readable one)
# it'd be possible to discard it as there's nowhere for its "notify" to
# propagate values to.  But maybe an add() could be made to extend an
# existing linkage, in which case would still want that last element.  Maybe

lib/Glib/Ex/ConnectProperties.pm  view on Meta::CPAN


    # value_validate() to clamp $to_val for $to_pspec
    # value_validate() is wrapped in Glib 1.220, remove the check when ready
    # to demand that version
    # In 1.240 may have to keep a new non ref counted boxed return from
    # func_in() alive if value_validate() makes an alias, hence
    # $to_val_keepalive.
    #
    my $to_val_keepalive = $to_val;
    (undef, $to_val) = $to_pspec->$value_validate_method($to_val);

    # skip if target already contains $to_val, to avoid extra 'notify's
    if ($to_flags & 'readable') {
      if (_pspec_equal ($to_pspec, $to_elem->get_value, $to_val)) {

 view all matches for this distribution


Glib

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN

	retrieve the GPerlValueWrapperClass that corresponds to a given
	GType.

	* GBoxed.xs, GType.xs: Document that gperl_register_boxed() and
	gperl_register_fundamental_full() assume that the wrapper class is
	statically allocated and that it will always be alive.

2005/03/07	kaffeetisch

	* Glib.pm, Makefile.PL, META.yml, NEWS, README: Stable release
	1.080.

ChangeLog.pre-git  view on Meta::CPAN

	subclasses, and some tests for it
	* Glib.pm: pod updates
        * GObject.xs: big change in how perl wrappers are implemented.
	the new implementation will only ever create one perl wrapper (a
	real hash, with magic containing the gobject's address) for any
	gobject. The combined perl+gobject will stay alive as long as one
	of the partners is alive. The only real changes are in
	gperl_new_object and in the DESTROY method.
        * GType.xs: rename INSTANCE_INIT to INIT_INSTANCE and make it a
        function call as opposed to a method call. Also call FINALIZE_INSTANCE
        on object finalization time.  implemented creation of properties
	for an object in Glib::Type::register, and implemented calling

 view all matches for this distribution


( run in 3.720 seconds using v1.01-cache-2.11-cpan-14f38c9f855 )