view release on metacpan or search on metacpan
t/lib/Test_1415.pm view on Meta::CPAN
like( $self->{debugger}->__send('L w'), qr/fonts/, 'set watchpoints for @fonts' );
#this is 'unlike' as it's a side affect of using a wantarry
unlike( my @list = $self->{debugger}->run, qr/Watchpoint/, 'Watchpoint value changed' );
like( $self->{debugger}->get_buffer, qr/fonts changed/, 'check buffer' );
unlike( $self->{debugger}->module, qr/TERMINATED/, 'module still alive' );
#tell D::C to get cursor position info_line
$self->{debugger}->get_lineinfo;
like( $self->{debugger}->get_filename, qr/test_1415/, 'check where we are filename' );
is( $self->{debugger}->get_row, 19, 'check where we are row 19' );
t/lib/Test_1415.pm view on Meta::CPAN
like( $self->{debugger}->run, qr/Watchpoint/, 'stoped for watchpoint' );
# like( $debugger->run, qr/Watchpoint/, 'stoped for watchpoint' );
like( $self->{debugger}->get_buffer, qr/fonts changed/, 'check buffer for fonts changed' );
unlike( $self->{debugger}->module, qr/TERMINATED/, 'module still alive' );
#tell D::C to get cursor position info_line
$self->{debugger}->get_lineinfo;
like( $self->{debugger}->get_filename, qr/test_1415/, 'check where we are filename' );
is( $self->{debugger}->get_row, 27, 'check where we are row 27' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Debug/LTrace.pm view on Meta::CPAN
use Debug::LTrace;
{
my $tracer = Debug::LTrace->new('tsub'); # create local tracer
tsub(1); # Tracing is on while $tracer is alive
}
tsub(2); # Here tracing is off
lib/Debug/LTrace.pm view on Meta::CPAN
use Debug::LTrace qw/*/;
# Trace all subroutines in package "SomeModule" and "AnotherModule::foo"
use Debug::LTrace qw/SomeModule::* AnotherModule::foo/;
=item local tracing (is on only when $tracer is alive):
# Trace foo, bar subroutines in current package (can be not "main")
my $tracer = Debug::LTrace->new( 'foo', 'bar' );
# Trace all subroutines in current package (can be not "main")
view all matches for this distribution
view release on metacpan or search on metacpan
docs/Deco.tex view on Meta::CPAN
Ofcourse we have to calculate this time for every tissue and take the minimum value as limit for
the diver to remain at the depth.
\chapter{Oxygen}
Oxygen is the gas that keeps you alive. The human body needs oxygen to generate energy. We can't do very long
without it. Oxygen however can also kill you. In certain cases, it becomes poisenous. In recreational diving with
air you will hardly run into the oxygen limits. If you stick to not going deeper than the advised maximum depth
of 40 meters and keeping within the no-decompression limits.
\section{CNS}
view all matches for this distribution
view release on metacpan or search on metacpan
DC::set_proxy;
my $ua = LWP::UserAgent->new (
agent => "deliantra $VERSION",
keep_alive => 1,
env_proxy => 1,
timeout => 30,
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
Deliantra.pm view on Meta::CPAN
current_weapon_script weapontype tooltype elevation client_type
item_power duration range
range_modifier duration_modifier dam_modifier gen_sp_armour
move_type move_block move_allow move_on move_off move_on move_slow move_slow_penalty
alive wiz was_wiz applied unpaid can_use_shield no_pick is_animated monster
friendly generator is_thrown auto_apply treasure player sold see_invisible
can_roll overlay_floor is_turnable is_used_up identified reflecting changing
splitting hitback startequip blocksview undead scared unaggressive
reflect_missile reflect_spell no_magic no_fix_player is_lightable tear_down
run_away pick_up unique no_drop can_cast_spell can_use_scroll can_use_range
Deliantra.pm view on Meta::CPAN
if ($type > 0) {
$root = $Deliantra::Data::ATTR{$type};
} else {
my %a = (%$arch, %$obj);
if ($a{is_floor} && !$a{alive}) {
$root = $Deliantra::Data::TYPE{Floor};
} elsif (!$a{is_floor} && $a{alive} && !$a{tear_down}) {
$root = $Deliantra::Data::TYPE{"Monster & NPC"};
} elsif (!$a{is_floor} && !$a{alive} && $a{move_block}) {
$root = $Deliantra::Data::TYPE{Wall};
} elsif (!$a{is_floor} && $a{alive} && $a{tear_down}) {
$root = $Deliantra::Data::TYPE{"Weak Wall"};
} else {
$root = $Deliantra::Data::TYPE{Misc};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/debugServer.pl view on Meta::CPAN
return; #nothing to do for now
}
foreach my $pid (keys %processesInfos){
if (Time::HiRes::tv_interval ($processesInfos{$pid}{lastUpdateTime}) > 1.5 ){
my $processSignaled = kill ( 0 => $pid); #send no signal to check process alive
if ($processSignaled){
$processesInfos{$pid}{lastUpdateTime} = [Time::HiRes::gettimeofday()];
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
print Devel::FindRef::track \$some_variable;
=head1 DESCRIPTION
Tracking down reference problems (e.g. you expect some object to be
destroyed, but there are still references to it that keep it alive) can be
very hard. Fortunately, perl keeps track of all its values, so tracking
references "backwards" is usually possible.
The C<track> function can help track down some of those references back to
the variables containing them.
view all matches for this distribution
view release on metacpan or search on metacpan
t/06_load-in-gd.t view on Meta::CPAN
use POSIX qw(_exit);
$|++;
print "1..3\n";
our $alive = Test::Scope::Guard->new(sub {
require Devel::GlobalDestruction;
my $gd = Devel::GlobalDestruction::in_global_destruction();
print(($gd ? '' : 'not ') . "ok 3 - global destruct detected when loaded during GD\n");
_exit($gd ? 0 : 1);
});
print(($alive ? '' : 'not ') . "ok 1 - alive during runtime\n");
END {
print(($alive ? '' : 'not ') . "ok 2 - alive during END\n");
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/REPL.pm view on Meta::CPAN
filename like so:
system$ re.pl --rcfile myproject.pc
If the filename happens to contain a forward slash, then it's used absolutely,
or realive to the current working directory:
system$ re.pl --rcfile /path/to/my/project/repl.rc
Within the run control file you might want to load plugins. This is covered in
L</"The REPL shell object"> section, below.
view all matches for this distribution
view release on metacpan or search on metacpan
eg/output.html view on Meta::CPAN
"\$app" => \do{my $fix},
"\$buf" => \"",
"\$conn" => \bless(Symbol::gensym(), "IO::Socket::INET"),
"\$env" => \do{my $fix},
"\$input" => \do{my $fix},
"\$is_keepalive" => \1,
"\$reqlen" => \145,
"\$res" => \[400, ["Content-Type", "text/plain"], ["Bad Request"]],
"\$rlen" => \145,
"\$self" => \bless({
host => 0,
keepalive_timeout => 2,
listen_sock => bless(Symbol::gensym(), "IO::Socket::INET"),
max_keepalive_reqs => 100,
port => 8080,
timeout => 300,
}, "Plack::Server::Standalone"),
"\$use_keepalive" => \undef,
},
line => 153,
max_arg_length => undef,
"package" => "Plack::Server::Standalone",
respect_overload => undef,
eg/output.html view on Meta::CPAN
lexicals => {
"\$app" => \do{my $fix},
"\$conn" => \do{my $fix},
"\$env" => \do{my $fix},
"\$max_reqs_per_child" => \undef,
"\$may_keepalive" => \1,
"\$proc_req_count" => \5,
"\$req_count" => \1,
"\$self" => \do{my $fix},
},
line => 111,
eg/output.html view on Meta::CPAN
"psgi.run_once" => "",
"psgi.url_scheme" => "http",
"psgi.version" => [1, 0],
};
my $input = \*Plack::Server::Standalone::$input;
my $is_keepalive = 1;
my $reqlen = 145;
my $res = [400, ["Content-Type", "text/plain"], ["Bad Request"]];
my $rlen = 145;
my $self = do {
require Symbol;
my $a = bless({
host => 0,
keepalive_timeout => 2,
listen_sock => bless(Symbol::gensym(), "IO::Socket::INET"),
max_keepalive_reqs => 100,
port => 8080,
timeout => 300,
}, "Plack::Server::Standalone");
*{$a->{listen_sock}} = {
io_socket_domain => 2,
eg/output.html view on Meta::CPAN
io_socket_timeout => undef,
io_socket_type => 1,
};
$a;
};
my $use_keepalive = undef;
</pre></body></html></li><li>in Plack::Server::Standalone::handle_connection at lib/Plack/Server/Standalone.pm line 111<pre class="context"><code> 108: if ($may_keepalive && $max_reqs_per_child && $proc_req_count >...
109: $may_keepalive = undef;
110: }
<strong class="match"> 111: $self->handle_connection($env, $conn, $app, $may_keepalive, $req_count != 0)
</strong> 112: or last;
113: # TODO add special cases for clients with broken keep-alive support, as well as disabling keep-alive for HTTP/1.0 proxies
114: }
</code></pre><p><a class="toggle" href="javascript:showLexicals('lexicals-12')">Show lexical variables</a></p><pre class="lexicals" id="lexicals-12">my $app = sub { "???" };
my $conn = do {
require Symbol;
my $a = bless(Symbol::gensym(), "IO::Socket::INET");
eg/output.html view on Meta::CPAN
"psgi.run_once" => "",
"psgi.url_scheme" => "http",
"psgi.version" => [1, 0],
};
my $max_reqs_per_child = undef;
my $may_keepalive = 1;
my $proc_req_count = 5;
my $req_count = 1;
my $self = do {
require Symbol;
my $a = bless({
host => 0,
keepalive_timeout => 2,
listen_sock => bless(Symbol::gensym(), "IO::Socket::INET"),
max_keepalive_reqs => 100,
port => 8080,
timeout => 300,
}, "Plack::Server::Standalone");
*{$a->{listen_sock}} = {
io_socket_domain => 2,
eg/output.html view on Meta::CPAN
</code></pre><p><a class="toggle" href="javascript:showLexicals('lexicals-13')">Show lexical variables</a></p><pre class="lexicals" id="lexicals-13">my $app = sub { "???" };
my $self = do {
require Symbol;
my $a = bless({
host => 0,
keepalive_timeout => 2,
listen_sock => bless(Symbol::gensym(), "IO::Socket::INET"),
max_keepalive_reqs => 100,
port => 8080,
timeout => 300,
}, "Plack::Server::Standalone");
*{$a->{listen_sock}} = {
io_socket_domain => 2,
eg/output.html view on Meta::CPAN
my $help = 0;
my $server = do {
require Symbol;
my $a = bless({
host => 0,
keepalive_timeout => 2,
listen_sock => bless(Symbol::gensym(), "IO::Socket::INET"),
max_keepalive_reqs => 100,
port => 8080,
timeout => 300,
}, "Plack::Server::Standalone");
*{$a->{listen_sock}} = {
io_socket_domain => 2,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/StackTrace.pm view on Meta::CPAN
If this parameter is true, then Devel::StackTrace will store references
internally when generating stacktrace frames.
B<This option is very dangerous, and should never be used with exception
objects>. Using this option will keep any objects or references alive past
their normal lifetime, until the stack trace object goes out of scope. It can
keep objects alive even after their C<DESTROY> sub is called, resulting it it
being called multiple times on the same object.
If not set, Devel::StackTrace replaces any references with their stringified
representation.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/ebug.pm view on Meta::CPAN
my $command = "$backend $program";
my $proc = Proc::Background->new(
{'die_upon_destroy' => 1},
$command
);
croak(qq{Devel::ebug: Failed to start up "$program" in load()}) unless $proc->alive;
$self->proc($proc);
$ENV{SECRET} = "";
$self->attach($port, $secret);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Developer/Dashboard.pm view on Meta::CPAN
to the QEMU launcher for release-grade Windows compatibility claims. The
supported baseline on Windows is PowerShell plus Strawberry Perl. Git Bash is
optional. Scoop is optional. They are setup helpers, not runtime requirements
for the installed C<dashboard> command. In the Dockur-backed path, the launcher
stages the Strawberry Perl MSI from the Linux host into the OEM bundle and can
keep multiple retained Windows guests alive on configurable host web/RDP ports
while it reruns the same smoke.
=head2 Browser Access Model
The browser security model follows the original local-first trust concept:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Cisco/NXAPI.pm view on Meta::CPAN
'state' => 'Idle',
'updatesrecvd' => '0',
'up' => 'false',
'index' => '1',
'updatessent' => '0',
'keepaliverecvd' => '0',
'holdtime' => '180',
'resettime' => 'never',
'neighbor' => '1.1.1.1',
'lastread' => 'never',
'opensrecvd' => '0',
lib/Device/Cisco/NXAPI.pm view on Meta::CPAN
'notificationsrcvd' => '0',
'msgrecvd' => '0',
'rtrefreshrecvd' => '0',
'rtrefreshsent' => '0',
'version' => '4',
'firstkeepalive' => 'false',
'remoteas' => '65001',
'keepalivesent' => '0',
'notificationssent' => '0',
'bytessent' => '0',
'remote-id' => '0.0.0.0',
'keepalivetime' => '60',
'peerresetreason' => 'No error',
'restarttime' => '00:00:01',
'lastwrite' => 'never',
'connsestablished' => '0',
'connsdropped' => '0',
lib/Device/Cisco/NXAPI.pm view on Meta::CPAN
'neighbor',
'remoteas',
'remote-id',
'version',
'holdtime',
'keepalivetime',
'connsdropped',
'connsestablished',
'restarttime',
'firstkeepalive',
'sentbytesoutstanding',
'msgsent',
'msgrecvd',
'bytessent',
'bytesrecvd',
lib/Device/Cisco/NXAPI.pm view on Meta::CPAN
'openssent',
'opensrecvd',
'notificationssent',
'notificationsrcvd',
'rtrefreshsent',
'keepaliverecvd',
'connattempts',
'lastread',
'rtrefreshrecvd',
'index',
'peerresettime',
'recvbufbytes',
'capabilitiessent',
'elapsedtime',
'lastwrite',
'keepalivesent',
);
my %peer_info = %{ $bgp_peer }{ @extracted_keys };
push @ret_bgp_peers, \%peer_info;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/xml/op/ha/ha_enabled.xml view on Meta::CPAN
<response status="success"><result><enabled>yes</enabled><group><mode>Active-Passive</mode><local-info><url-compat>Unknown</url-compat><app-version>769-4439</app-version><gpclient-version>Unknown</gpclient-version><build-rel>8.1.3</build-rel><ha2-por...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Modem.pm view on Meta::CPAN
connect to a modem on your serial port
=item *
test if the modem is alive and working
=item *
dial a number and connect to a remote modem
lib/Device/Modem.pm view on Meta::CPAN
=over 4
=item `examples/active.pl'
Tests if modem is alive
=item `examples/caller-id.pl'
Waits for an incoming call and displays date, time and phone number of the caller.
Normally this is available everywhere, but you should check your local phone line
lib/Device/Modem.pm view on Meta::CPAN
$ok = $modem->hangup();
=head2 is_active()
Can be used to check if there is a modem attached to your computer.
If modem is alive and responding (on serial link, not to a remote call),
C<is_active()> returns true (1), otherwise returns false (0).
Test of modem activity is done through DSR (Data Set Ready) signal. If
this signal is in off state, modem is probably turned off, or not working.
From my tests I've found that DSR stays in "on" state after more or less
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/PaloAlto/Firewall/Return.pod view on Meta::CPAN
'holdtime' => '90',
'peer-router-id' => '1.1.1.20',
'peer-group' => 'Cisco',
'prefix-limit' => '5000',
'last-error' => {},
'keepalive' => '30',
'status-flap-counts' => '2',
'prefix-counter' => {
'entry' => [
{
'incoming-accepted' => '2',
lib/Device/PaloAlto/Firewall/Return.pod view on Meta::CPAN
'nexthop-peer' => 'no',
'same-confederation' => 'no',
'established-counts' => '1',
'holdtime-config' => '90',
'reflector-client' => 'not-client',
'keepalive-config' => '30',
'peer-capability' => {
'list' => [
{
'capability' => 'Multiprotocol Extensions(1)'
},
view all matches for this distribution
view release on metacpan or search on metacpan
t/20inherited.t view on Meta::CPAN
## 121 - 135: Record and Field Separators
my $r = "I am the very model of an output record separator"; ## =49
# 1234567890123456789012345678901234567890123456789
my $f = "The fields are alive with the sound of music"; ## =44
my $ff = "$f, with fields they have sung for a thousand years"; ## =93
my $rr = "$r, not animal or vegetable or mineral or any other"; ## =98
is_ok($ob->output_record_separator eq ""); # 121
is_ok($ob->output_field_separator eq ""); # 122
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dezi/Aggregator/Spider.pm view on Meta::CPAN
isa => Str,
default => sub {'dezi@user.failed.to.set.email.invalid'},
);
has 'file_rules' => ( is => 'rw', isa => DeziFileRules, coerce => 1, );
has 'follow_redirects' => ( is => 'rw', isa => Bool, default => sub {1} );
has 'keep_alive' => ( is => 'rw', isa => Bool, default => sub {0} );
# whitelist which HTML tags we consider "links"
# should be subset of what HTML::LinkExtor considers links
has 'link_tags' => (
is => 'rw',
lib/Dezi/Aggregator/Spider.pm view on Meta::CPAN
This optional parameter will skip any URIs that do not report having
been modified since I<date>. The C<Last-Modified> HTTP header is used to
determine modification time.
=item keep_alive I<1|0>
This optional parameter will enable keep alive requests. This can dramatically speed
up spidering and reduce the load on server being spidered. The default is to not use
keep alives, although enabling it will probably be the right thing to do.
To get the most out of keep alives, you may want to set up your web server to
allow a lot of requests per single connection (i.e MaxKeepAliveRequests on Apache).
Apache's default is 100, which should be good.
When a connection is not closed the spider does not wait the "delay"
time when making the next request. In other words, there is no delay in
lib/Dezi/Aggregator/Spider.pm view on Meta::CPAN
#$self->{ua}->max_size( $self->{max_size} ) if $self->{max_size};
if ( $self->use_cookies ) {
$self->{ua}->cookie_jar( HTTP::Cookies->new() );
}
if ( $self->keep_alive ) {
if ( $self->{ua}->can('conn_cache') ) {
$self->{ua}
->conn_cache( { total_capacity => $self->keep_alive } );
}
else {
warn
"can't use keep-alive: conn_cache() method not available on ua "
. ref( $self->{ua} );
}
}
$self->{_current_depth} = 1;
lib/Dezi/Aggregator/Spider.pm view on Meta::CPAN
my ( $self, $uri ) = @_;
# get our useragent
my $ua = $self->ua;
my $delay = 0;
if ( $self->{keep_alive} ) {
$delay = 0;
}
elsif ( !$self->{delay} or !$self->{_last_response_time} ) {
$delay = 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; IsAlive(farmhashcc::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashcc::Hash32(data, len++)); { uint128_t u = farmhashcc::Fingerprint128(data, len++); uint64_t h = Uint128Low64(u); IsAlive(h >> 32); IsAlive((h <...
Check(farmhashcc::Hash32WithSeed(data + offset, len, SEED));
Check(farmhashcc::Hash32(data + offset, len));
{ uint128_t u = farmhashcc::Fingerprint128(data + offset, len); uint64_t h = Uint128Low64(u); Check(h >> 32); Check((h << 32) >> 32); h = Uint128High64(u); Check(h >> 32); Check((h << 32) >> 32); }
{ uint128_t u = farmhashcc::CityHash128WithSeed(data + offset, len, Uint128(SEED0, SEED1)); uint64_t h = Uint128Low64(u); Check(h >> 32); Check((h << 32) >> 32); h = Uint128High64(u); Check(h >> 32); Check((h << 32) >> 32); }
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; IsAlive(farmhashmk::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashmk::Hash32(data, len++)); IsAlive(farmhashmk::Hash32(data, len++)); len -= 3; return alive > 0; }
Check(farmhashmk::Hash32WithSeed(data + offset, len, SEED));
Check(farmhashmk::Hash32(data + offset, len));
return true;
#undef Check
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; { uint64_t h = farmhashna::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashna::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) ...
{ uint64_t h = farmhashna::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashna::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashna::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); }
return true;
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; IsAlive(farmhashnt::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashnt::Hash32(data, len++)); IsAlive(farmhashnt::Hash32(data, len++)); len -= 3; return alive > 0; }
Check(farmhashnt::Hash32WithSeed(data + offset, len, SEED));
Check(farmhashnt::Hash32(data + offset, len));
return true;
#undef Check
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; IsAlive(farmhashsa::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashsa::Hash32(data, len++)); IsAlive(farmhashsa::Hash32(data, len++)); len -= 3; return alive > 0; }
Check(farmhashsa::Hash32WithSeed(data + offset, len, SEED));
Check(farmhashsa::Hash32(data + offset, len));
return true;
#undef Check
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; IsAlive(farmhashsu::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashsu::Hash32(data, len++)); IsAlive(farmhashsu::Hash32(data, len++)); len -= 3; return alive > 0; }
Check(farmhashsu::Hash32WithSeed(data + offset, len, SEED));
Check(farmhashsu::Hash32(data + offset, len));
return true;
#undef Check
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; { uint64_t h = farmhashte::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashte::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) ...
{ uint64_t h = farmhashte::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashte::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashte::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); }
return true;
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; { uint64_t h = farmhashuo::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashuo::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h ...
{ uint64_t h = farmhashuo::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashuo::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); }
return true;
#undef Check
ext/farmhash/farmhash.cc view on Meta::CPAN
++errors; \
} \
assert(ok); \
} while (0)
#define IsAlive(x) do { alive += IsNonZero(x); } while (0)
// After the following line is where the uses of "Check" and such will go.
static int index = 0;
if (offset == -1) { int alive = 0; { uint64_t h = farmhashxo::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashxo::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) ...
{ uint64_t h = farmhashxo::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashxo::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); }
{ uint64_t h = farmhashxo::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); }
return true;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dir/Flock.pm view on Meta::CPAN
a running process should be able to update the timestamp of
their lockfiles (either the mtime known to the filesystem or
in the file data themselves) to let other processes (on the
same and other hosts) know that the locking process is still
alive. Can you do that without releasing the lock?
Include heartbeat data in the file names? "touch" lock files
at the heartbeat so that the mtime's are updated?
Threads
In _ping_oldest_file , how to detect whether a thread is
still alive? How to detect whether a process or thread on
a remote machine is still alive?
If a SyncObject2 is inherited in a fork or a thread,
will DESTROY release its lock?
=end TODO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Directory/Transactional.pm view on Meta::CPAN
my $txn;
if ( my $p = $self->_txn ) {
# this is a child transaction
croak "Can't txn_begin if an auto transaction is still alive" if $p->auto_handle;
$txn = Directory::Transactional::TXN::Nested->new(
parent => $p,
manager => $self,
);
lib/Directory/Transactional.pm view on Meta::CPAN
If C<crash_detection> is enabled (the default) when reading any file from the
root directory (shared global state) the system will first check for crashed
commits.
Crashed commits are detected by means of lock files. If the backup directory is
locked that means its comitting process is still alive, but if a directory
exists without a lock then that process has crashed. A global dirty flag is
maintained to avoid needing to check all the backup directories each time.
If the commit is still running then it can be assumed that the process
comitting it still has all of its exclusive locks so reading from the root
lib/Directory/Transactional.pm view on Meta::CPAN
For operations like C<rename> or C<readdir> which do not return resource the
transaction is comitted immediately.
Operations like C<open> or C<file_stream> on the other create a transaction
that will be alive as long as the return value is alive.
This means that you should not leak filehandles when relying on autocommit.
Opening a new transaction when an automatic one is already opened is an error.
lib/Directory/Transactional.pm view on Meta::CPAN
If true (the default) any operation not performed within a transaction will
cause a transaction to be automatically created and comitted.
Transactions automatically created for operations which return things like
filehandles will stay alive for as long as the returned resource does.
=item crash_detection
IF true (the default), all read operations accessing global state (the root
directory) will first ensure that the global directory is not dirty.
If the perl process crashes while comitting the transaction but other
concurrent processes are still alive, the directory is left in an inconsistent
state, but all the locks are dropped. When C<crash_detection> is enabled ACID
semantics are still guaranteed, at the cost of locking and stating a file for
each read operation on the global directory.
If you disable this then you are only protected from system crashes (recovery
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Surveyor/Inquiry.pm view on Meta::CPAN
my ($ua, $wget, $curl);
if (HTTP::Tiny->can_ssl) {
$ua = HTTP::Tiny->new(
agent => $agent_string,
timeout => 10,
keep_alive => 1,
);
} else { # for fatpacking support
require File::Which;
require IPC::System::Simple;
$wget = File::Which::which('wget');
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Local/HTTP/Tiny/Mock.pm view on Meta::CPAN
'content-type' => 'text/yaml',
'x-timer' => 'S1506018172.065497,VS0,VE2',
'x-cache-hits' => '1, 1',
'content-length' => '12653',
'date' => 'Thu, 21 Sep 2017 18:22:52 GMT',
'connection' => 'keep-alive',
'x-cache' => 'HIT, HIT',
'age' => '130393',
'via' => [
'1.1 varnish',
'1.1 varnish'
t/lib/Local/HTTP/Tiny/Mock.pm view on Meta::CPAN
'via' => [
'1.1 varnish',
'1.1 varnish'
],
'fastly-debug-digest' => 'abe8f8abc3c33a054b261732aa0cb98d62f1ca227a5aafd2fa53981ccd3d1f62',
'connection' => 'keep-alive',
'x-served-by' => 'cache-sjc3151-SJC, cache-hhn1538-HHN',
'x-timer' => 'S1506021365.113918,VS0,VE208',
'x-cache-hits' => '0, 0',
'x-runtime' => '0.046718',
'content-length' => '10',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/CheckVersionIncrement.pm view on Meta::CPAN
### $pkg
my $pkg_version = version->parse($self->zilla->version);
my $indexed_version;
my $ua = LWP::UserAgent->new(keep_alive => 1);
$ua->env_proxy;
my $res = $ua->get("http://cpanidx.org/cpanidx/json/mod/$pkg");
if ($res->is_success) {
my $yaml_octets = encode_utf8($res->decoded_content);
my $payload = JSON::PP->new->decode($yaml_octets);
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-Provider/01-boolean-attrs.t view on Meta::CPAN
use Path::Tiny qw( path );
use Test::DZil qw( simple_ini Builder );
use lib 't/lib';
# Keepalive
my $builder;
sub make_plugin {
my @args = @_;
$builder = Builder->from_config(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/ModuleInstall.pm view on Meta::CPAN
with 'Dist::Zilla::Role::BuildRunner';
with 'Dist::Zilla::Role::InstallTool';
with 'Dist::Zilla::Role::TextTemplate';
# no broken tempdir, keepalive_fail helper
use Dist::Zilla::Role::Tempdir 1.001000;
with 'Dist::Zilla::Role::Tempdir';
with 'Dist::Zilla::Role::PrereqSource';
with 'Dist::Zilla::Role::TestRunner';
lib/Dist/Zilla/Plugin/ModuleInstall.pm view on Meta::CPAN
my $error_load = 'Error running Makefile.PL for Module::Install. ';
my $no_keepalive = $error_load . 'Set MI_KEEPALIVE=1 if you want to retain the directory for analysis';
my $keepalive = $error_load . 'Inspect the temporary directory to determine cause';
sub setup_installer {
my ( $self, ) = @_;
my $file = Dist::Zilla::File::FromCode->new( { name => 'Makefile.PL', code => sub { _generate_makefile_pl($self) }, } );
lib/Dist/Zilla/Plugin/ModuleInstall.pm view on Meta::CPAN
my $code = sub {
my ($dir) = @_;
system $^X, 'Makefile.PL' and do {
croak($no_keepalive) unless $ENV{MI_KEEPALIVE};
$dir->keepalive_fail($keepalive);
};
};
my (@generated) = $self->capture_tempdir($code);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Tempdir/Dir.pm view on Meta::CPAN
sub keepalive {
my $nargs = my ( $self, $keep ) = @_;
my $path = $self->_tempdir;
if ( $nargs < 2 ) {
lib/Dist/Zilla/Tempdir/Dir.pm view on Meta::CPAN
sub keepalive_fail {
my ( $self, $message ) = @_;
if ( not $message ) {
$message = q[];
}
else {
$message .= qq[\n];
}
$message .= q[Role::Tempdir's scratch directory preserved at ] . $self->keepalive(1);
croak $message;
}
no Moose;
__PACKAGE__->meta->make_immutable;
lib/Dist/Zilla/Tempdir/Dir.pm view on Meta::CPAN
return 1;
});
Enter the temporary directory and run the passed code block, which is assumed to be creating/modifying/deleting files.
=head2 C<keepalive>
Utility method: Marks the temporary directory for preservation.
$dir->keepalive() # simply returns the path to the tempdir
$dir->keepalive(1) # mark for retention
$dir->keepalive(0) # mark for erasure
This is mostly an insane glue layer for
$dir->_tempdir->[Path::Tiny::TEMP]->unlink_on_destroy($x)
Except the insanity of poking too many internal guts is well encapsulated.
=head2 C<keepalive_fail>
A utility method to invoke a croak (heh) that preserves the scratch directory, and tells
the croak recipient where to find it.
$dir->keepalive_fail();
$dir->keepalive_fail("Some Diagnostic Reason");
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dita/GB/Standard.pm view on Meta::CPAN
use utf8;
sub useWords{0} #r Use word representation of md5 sum if true
# Each word is 5 characters long so we can gain 5 bits per word using capitalization. There are 2177 words below or 11 bits - enough room to reach 16 bits per word with the 5 extra from capitalization.
my @words = qw(aback abate abbey abhor abide abort about above abuse abyss acorn acrid actor acute adage adapt adept admit adobe adopt adore adorn adult affix after again agent agile aging agony agree ahead aisle alarm album aleck alert algae alias a...
!useWords or @words > 2**11 or confess "Not enough words";
sub hex4ToBits($) #P Represent 4 hex digits as (1, 1, 1, 1, 1, 12) bits
{my ($h) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
t/05_pagination.t view on Meta::CPAN
headers => {
'docker-distribution-api-version' => 'registry/2.0',
'date' => 'Wed, 21 Oct 2015 07:28:00 GMT',
'transfer-encoding' => 'chunked',
'content-type' => 'text/plain; charset=utf-8',
'connection' => 'keep-alive',
$args->{last}
? (link => "<https://my.awesome.registry/v2/my-repository/tags/list?last=$args->{last}&n=1000>; rel='next'")
: (),
},
content => $args->{content}
view all matches for this distribution