view release on metacpan or search on metacpan
lib/Google/Fusion.pm view on Meta::CPAN
=item * access_token <Str>
A temporary access token aquired during the authorization process
Can be defined here, otherwise it will be aquired during the authorization process
=item * keep_alive <Int>
Use keep_alive for connections - this will make the application /much/ more responsive.
Default: 1
=item * headers <Bool>
lib/Google/Fusion.pm view on Meta::CPAN
has 'access_token' => ( is => 'ro', isa => 'Str', );
has 'access_code' => ( is => 'ro', isa => 'Str', );
has 'query_cache' => ( is => 'ro', isa => 'Str', );
has 'token_store' => ( is => 'ro', isa => 'Str', );
has 'headers' => ( is => 'ro', isa => 'Bool', required => 1, default => 1, );
has 'keep_alive' => ( is => 'ro', isa => 'Bool', required => 1, default => 1, );
has 'auth_client' => ( is => 'ro', required => 1, lazy => 1,
isa => 'Net::OAuth2::Moosey::Client',
builder => '_build_auth_client',
);
has 'insert_buffer' => ( is => 'rw', isa => 'Str', clearer => 'clear_insert_buffer', default => sub{ '' } );
lib/Google/Fusion.pm view on Meta::CPAN
site_url_base => 'https://accounts.google.com/o/oauth2/auth',
access_token_url_base => 'https://accounts.google.com/o/oauth2/token',
authorize_url_base => 'https://accounts.google.com/o/oauth2/auth',
scope => 'https://www.google.com/fusiontables/api/query',
);
foreach( qw/client_id client_secret refresh_token access_code access_token keep_alive token_store/ ){
$client_params{$_} = $self->$_ if defined $self->$_;
}
# $self->logger->debug( "Initialising Client with:\n". Dump( \%client_params ) );
my $client = Net::OAuth2::Moosey::Client->new( %client_params );
view all matches for this distribution
view release on metacpan or search on metacpan
t/unit/Test/Google/RestApi.pm view on Meta::CPAN
require File::Spec;
$dir //= File::Spec->catdir($FindBin::RealBin, 'etc');
my $fh = File::Temp->new(SUFFIX => '.yaml', DIR => $dir, UNLINK => 1);
print $fh YAML::Any::Dump($data);
$fh->flush();
push @_temp_configs, $fh; # keep object alive; deleted at program end
return $fh->filename();
}
sub auth : Tests(4) {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/hog-fetch-all.pl view on Meta::CPAN
# No cookies so get a fresh search each time.
# Or could increment the historyIndex parameter to mean start new search.
# Would that be better, worse, or same?
#
my $mech = WWW::Mechanize->new (keep_alive => 1,
cookie_jar => undef);
$mech->agent("$FindBin::Script/$VERSION ".$mech->agent);
# ask for all compressions decoded_content() knows
$mech->add_header('Accept-Encoding' => scalar HTTP::Message::decodable());
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_Aesthetic.t view on Meta::CPAN
nearly($aglo->temperature, 1e2, "Default temperature is 1e2");
nearly($aglo->end_temperature, 1e-3, "Default end_temperature is 1e-3");
is($aglo->iterations, 1e3, "Default temperature is 1e3");
is($aglo->topology, $topo3, "Topology is available");
$topo3 = undef;
is($topo_destroys, 0, "aglo keeps topology alive");
$force_destroys = 0;
my $force = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
is($force_destroys, 0, "The force is alive");
$aglo->_add_force($force);
is($force_destroys, 0, "The force is alive");
$force = undef;
is($force_destroys, 0, "The force is alive");
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($topo_destroys, 1, "Toplogy Cleanup on last reference");
is($force_destroys, 1, "The force is gone");
t/02_Aesthetic.t view on Meta::CPAN
is($aglo->nr_dimensions, 2, "Undef means two dimensions");
$force_destroys = 0;
$force = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force);
$force = undef;
is($force_destroys, 0, "The force is alive");
$aglo->clear_forces;
is($force_destroys, 1, "The force is dead");
$force_destroys = 0;
my $force1 = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force1);
$force1 = undef;
my $force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
my @forces = $aglo->forces;
is(@forces, 2, "Two forces");
isa_ok($forces[0][0], "Graph::Layout::Aesthetic::Force::MinEdgeLength",
"Right force type");
is(@{$forces[0]}, 2, "Two element force members");
t/02_Aesthetic.t view on Meta::CPAN
isa_ok($forces[1][0], "Graph::Layout::Aesthetic::Force::NodeRepulsion",
"Right force type");
is($forces[1][1], 1, "Right default weight");
KillRef->test($forces[0]);
@forces = ();
is($force_destroys, 0, "The force is alive");
my $forces = $aglo->forces;
is(@$forces, 2, "Two forces");
isa_ok($forces->[0][0], "Graph::Layout::Aesthetic::Force::MinEdgeLength",
"Right force type");
t/02_Aesthetic.t view on Meta::CPAN
"Right force type");
is($forces->[1][1], 1, "Right default weight");
KillRef->test($forces->[0]);
KillRef->test($forces);
is($force_destroys, 0, "The force is alive");
$aglo = undef;
is($force_destroys, 2, "The force is dead");
# Check cleanup on the list form of forces
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);
t/02_Aesthetic.t view on Meta::CPAN
$aglo->_add_force($force1);
$force1 = undef;
$force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
@forces = $aglo->forces;
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($force_destroys, 0, "The force is alive");
@forces = 0;
is($force_destroys, 2, "The force is alive");
# Check cleanup on the scalar form of forces
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);
$force_destroys = 0;
$force1 = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force1);
$force1 = undef;
$force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
$forces = $aglo->forces;
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($force_destroys, 0, "The force is alive");
$forces = undef;
is($force_destroys, 2, "The force is alive");
$force_destroys = 0;
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);
eval { $aglo->_add_force(undef) };
like($@, qr!force is undefined at !i, "Proper error message");
t/02_Aesthetic.t view on Meta::CPAN
"Right force type");
is($forces[1][1], 1, "Right default weight");
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($force_destroys, 0, "Manager keeps forces alive");
# Getting and setting coordinates
$aglo = Graph::Layout::Aesthetic->new($topo3);
eval { $aglo->coordinates };
like($@, qr!Usage: Graph::Layout::Aesthetic::coordinates\(state, vertex, \.\.\.\) at !,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Graph/Maker/FibonacciTree.pm view on Meta::CPAN
tree(H-2) node tree(H-2)
/ \ | / \
... ... ... ... ...
This is the genealogy of Fibonacci's rabbit pairs. The root node 1 is a
pair of adult rabbits. They remain alive as node 2 and they have a pair of
baby rabbits as node 3. Those babies do not breed immediately but only in
the generation after at node 6. Every right tree branch is a baby rabbit
pair which does not begin breeding until the month after.
The tree branching follows the Fibonacci word. The Fibonacci word begins as
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '7.10',
},
TEST_REQUIRES => {
'Test::More' => '0.98',
'Mojolicious::Plugin::GraphQL' => '0.16', # keepalive
'Test::Snapshot' => '0.02', # better snapshot filenames
},
PREREQ_PM => {
'GraphQL' => '0.40', # subscriptions
},
view all matches for this distribution
view release on metacpan or search on metacpan
bin/find-unused-graphite-metrics.pl view on Meta::CPAN
my $gren = Graphite::Enumerator->new(
host => 'https://graphite.example.com',
basepath => $basepath,
lwp_options => {
env_proxy => 0,
keep_alive => 1,
},
);
$gren->enumerate( sub {
my ($path) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
script/grimlock_web_server.pl view on Meta::CPAN
-f --fork MAKE NEW PROCESS FOR REQUEST
(DEFAULT NO TRUE)
-? --help SHOW HELP PAGE FOR DUMMY WHO NO CAN REMEMBER HOW GRIMLOCK WORK
-h --host NAME OF COMPUTER TO RUN GRIMLOCK BEAUTIFUL BLOG SOFTWARE
-p --port NUMBER OF THINGY TO MAKE CONNECTION TO GRIMLOCK BLOG
-k --keepalive SPARE CONNECTION PUNY LIFE
-r --restart RESTART WHEN GET FRUSTRATED AND SMASH FILES
(DEFAULT NO TRUE)
-rd --restart_delay SLOW RESTART BLOG WHEN SMASH FILES
-rr --restart_regex RESTART WHEN THINGIES THAT MATCH ARE SMASHED
view all matches for this distribution
view release on metacpan or search on metacpan
Gtk/xs/GtkObject.xs view on Meta::CPAN
MODULE = Gtk::Object PACKAGE = Gtk::Object PREFIX = gtk_object_
#ifdef GTK_OBJECT
# FIXME: See if we need signal_connect_while_alive
int
signal_connect(object, event, handler, ...)
Gtk::Object object
char * event
view all matches for this distribution
view release on metacpan or search on metacpan
t/Test/Weaken/ExtraBits.pm view on Meta::CPAN
created permanently for each driver loaded, and which C<DBI::db> handles
then refer to.
A bug/misfeature of Perl through to at least 5.10.1 on lvalue C<substr>
means certain scratchpad temporaries of DBI "ImplementorClass" strings end
up held alive after C<DBI::db> and C<DBI::st> objects have finished with
them. These aren't recognised by C<ignore_DBI_globals> currently.
A workaround is to do a dummy C<DBI::db> creation to flush out the old
scratchpad.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/Dragger.pm view on Meta::CPAN
There's not much in the standard cursors for a grasping hand so you probably
have to make something like that from a pixmap.
Currently only a weak reference is kept to the target widget, so the fact
there's a dragger feature doesn't keep it alive forever. This means in
particular it's safe to hold the dragger object in the widget instance data
without creating a circular reference. But strong references are kept to
the adjustment objects since they probably should stay alive as long as the
widget and dragger do. But perhaps this will change.
Having the C<button-motion-mask> and C<button-release-mask> set before the
drag won't normally cost very many extra events.
view all matches for this distribution
view release on metacpan or search on metacpan
devel/AddOn-FollowAppend.pm view on Meta::CPAN
The FollowAppend works with whatever TextBuffer, if any, is set in
C<$textview> at a given time. It doesn't need a textbuf set initially, and
any textbuf can be changed or unset later.
C<$follow> only keeps a weak reference to C<$textview> so the mere
FollowAppend feature doesn't keep C<$textview> alive if nobody else cares if
it lives or dies. On that basis it's safe to hold C<$follow> in the hash of
C<$textview> itself,
$textview->{'follow'} = Gtk2::Ex::TextView::FollowAppend->new($textview);
view all matches for this distribution
view release on metacpan or search on metacpan
devel/Pause-backup.pm view on Meta::CPAN
the timer scrolling in C<$tickerview>. When you discard the object it
releases the pause, allowing scrolling to resume (once there's no other
Pauses, and the ticker C<run> is active, etc).
The Pause object only keeps a weak reference to C<$tickerview>, so the mere
fact you want to pause it doesn't keep it alive. This also means it's safe
to hold a pause object somewhere within C<$tickerview> itself without
creating a circular reference.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
t/TiedListColumn.t view on Meta::CPAN
{
my $store = Gtk2::ListStore->new ('Glib::String');
my $aref = Gtk2::Ex::TiedListColumn->new ($store);
require Scalar::Util;
Scalar::Util::weaken ($store);
ok ($store, 'store held alive by aref');
$aref = undef;
is ($store, undef, 'then garbage collected when aref gone');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/FreezeChildNotify.pm view on Meta::CPAN
FreezeChildNotify works by having C<thaw_child_notify> in the destroy code
of the FreezeChildNotify object.
FreezeChildNotify only holds weak references to its widgets, so the mere
fact they're due for later thawing doesn't keep them alive if nothing else
cares whether they live or die. The effect is that frozen widgets can be
garbage collected within a freeze block at the same point they would be
without any freezing, instead of extending their life to the end of the
block.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/WidgetCursor.pm view on Meta::CPAN
# @wobjs is all the WidgetCursor objects which currently exist, sorted from
# highest to lowest priority, and from newest to oldest among those of equal
# priority
#
# Elements are weakened so they don't keep the objects alive. The DESTROY
# method strips elements and undefs from here, but not sure if undef could
# still be seen in here by certain funcs at certain times.
#
my @wobjs = ();
lib/Gtk2/Ex/WidgetCursor.pm view on Meta::CPAN
=item C<widgets> (scalar arrayref of C<Gtk2::Widget>, default C<undef>)
The widget or widgets to act on.
A WidgetCursor object only keeps weak references to its widget(s), so the
mere fact there's a desired cursor won't keep a widget alive forever.
Garbage collected widgets drop out of the widgets list. In particular this
means it's safe to hold a WidgetCursor within a widget's own hash without
creating a circular reference. Eg.
my $widget = Gtk2::DrawingArea->new;
view all matches for this distribution
view release on metacpan or search on metacpan
is ($string1, 'string1');
is ($string2, 'string2, electric boogaloo');
is ($int1, 42);
is ($int2, 1138);
# verify that complex user data made it through, alive
is (ref($data), 'HASH');
is ($data->{one}, 1);
is ($data->{two}, 2);
my $widget = Gtk2::Button->new;
view all matches for this distribution
view release on metacpan or search on metacpan
ChangeLog.pre-git view on Meta::CPAN
* xs/GtkTreeView.xs: Describe the return values of
get_visible_range and get_tooltip_context. Patch by Kevin Ryde.
* xs/GtkTreeModel.xs: In the POD section about tree iterators, add
a paragraph explaining how data put into iterators needs to be
kept alive by the model. Patch by Kevin Ryde.
2008-04-20 Torsten Schoenfeld <kaffeetisch@gmx.de>
* t/GdkDisplay.t
* xs/GdkDisplay.xs: Allow undef for the display name parameter of
ChangeLog.pre-git view on Meta::CPAN
* t/GtkItemFactory.t: don't forget to return a string from the
translation func
* xs/GtkItemFactory.xs: keep the value returned from the perl
callback alive long enough to be used by the caller.
2004/01/24 21:44 (-0500) rwmcfa1
* Makefile.PL: removed runtime_reqs stuff, replaced by the pkg-config
trick
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GuacLite.pm view on Meta::CPAN
Because of these extra features it requires persistence (a database) and api calls to add/update users and hosts in order to use it.
Also, because it is written in Java any extension to the system must also be written in Java and served alongside it in a Tomcat or other JSP server.
The Javascript application, called "guacamole-common-js", is a browser-native client for guacd with the exception that it speaks websocket rather than direct tcp.
Therefore it requires a service that can provide that relay.
It also sends keep-alive (ping/pong) messages that don't conform to the guacamole protocol and that the proxy must filter out and reply to.
=head1 MOTIVATION AND COMPONENTS
This project exists to allow non-Java projects that wish to use guacamole-common-js to access a guacd service, without having to conform to the usage expectations of guacamole-common, and without having to alter that application via Java.
It provides a toolkit for implementing a frontend server/client to guacd via Perl and Mojolicious, without any built-in business logic (user management, host configuration).
lib/GuacLite.pm view on Meta::CPAN
The current supported version of the protocol is 1.3.0
=head2 Guacd Websocket Tunneling Plugin
L<GuacLite::Plugin::Guacd> is a plugin that provides a helper method to establish a websocket connection between a client and a guacd service via a configured (but not connected) L<GuacLite::Client::Guacd> instance.
It initiates the guacd connection and triggers the handshake, it then passes messages between the guacd connection and the client's websocket, monitoring backpressure between them, and handling the keep-alive messages.
In the future, passing a connected guacd client should be possible, but it hasn't been implemented yet.
=head2 Utilities
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Guard/Stats.pm view on Meta::CPAN
# in diagnostic procedures triggered by an external event
my $data = $stat->get_stat;
warn "$data->{running} callbacks still waiting to be executed";
Of course, alive/dead counts of any objects (not only sub refs) may be
monitored in a similar way.
=head1 DESCRIPTION
A guard is a special object that does something useful in destructor, typically
lib/Guard/Stats.pm view on Meta::CPAN
Its public methods are end( [$result] ) and is_done().
=head2 The counters
When a guard is created, the C<total> counter increases. When it's detroyed,
C<dead> counter increases. C<alive> = C<total> - C<dead> is the number of
guards that still exist.
Additionally, guards implement a C<end()> method which indicates that
the action associates with the guard is complete. Typically a guard should
be destroyed soon afterwards. The guards for which neither DESTROY nor
end were called are considered C<running> (this is used in C<on_level>).
The full matrix or DESTROY()/end() combinations is as follows:
DESTROY: * 0 1
end:* total+ alive dead
end:0 ? running broken+
end:1 done+ zombie complete+
A "+" marks values directly measured by Guard::Stats. They all happen to be
monotonous. Other statistics are derived from these.
lib/Guard/Stats.pm view on Meta::CPAN
=item * total() - all guards ever created;
=item * dead() - DESTROY was called;
=item * alive() - DESTROY was NOT called;
=item * done() - end() was called;
=item * complete() - both end() and DESTROY were called;
lib/Guard/Stats.pm view on Meta::CPAN
sub running {
my __PACKAGE__ $self = shift;
return $self->{total} - $self->{done} - $self->{broken};
};
sub alive {
my __PACKAGE__ $self = shift;
return $self->{total} - $self->{complete} - $self->{broken};
};
sub dead {
my __PACKAGE__ $self = shift;
lib/Guard/Stats.pm view on Meta::CPAN
my __PACKAGE__ $self = shift;
my %ret;
$ret{$_} = $self->{$_} for @values;
$ret{dead} = $ret{complete} + $ret{broken};
$ret{zombie} = $ret{done} - $ret{complete};
$ret{alive} = $ret{total} - $ret{dead};
$ret{running} = $ret{alive} - $ret{zombie};
return \%ret;
};
=head2 get_stat_result
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gungho/Engine/POE.pm view on Meta::CPAN
package Gungho::Engine::POE;
use strict;
use warnings;
use base qw(Gungho::Engine);
use POE;
use POE::Component::Client::Keepalive;
use POE::Component::Client::HTTP;
__PACKAGE__->mk_accessors($_) for qw(alias loop_alarm loop_delay resolver clients);
use constant DEBUG => 0;
lib/Gungho/Engine/POE.pm view on Meta::CPAN
{
my ($self, $c) = @_;
my %config = %{ $self->config || {} };
my $keepalive_config = delete $config{keepalive} || {};
{
my %defaults = (
keep_alive => 10,
max_open => 200,
max_per_host => 5,
timeout => 10
);
while (my($key, $value) = each %defaults) {
if (! defined $keepalive_config->{$key}) {
$keepalive_config->{$key} = $value;
}
}
}
my $keepalive = POE::Component::Client::Keepalive->new(%$keepalive_config);
my $client_config = delete $config{client} || {};
foreach my $key (keys %$client_config) {
if ($key =~ /^[a-z]/) { # ah, need to make this CamelCase
my $camel = ucfirst($key);
lib/Gungho/Engine/POE.pm view on Meta::CPAN
FollowRedirects => 1,
Agent => $c->user_agent,
Timeout => 60,
%$client_config,
Alias => $alias,
ConnectionManager => $keepalive,
);
}
POE::Session->create(
heap => { CONTEXT => $c },
lib/Gungho/Engine/POE.pm view on Meta::CPAN
- AgentName1
- AgentName2
max_size: 16384
follow_redirect: 2
proxy: http://localhost:8080
keepalive:
keep_alive: 10
max_open: 200
max_per_host: 20
timeout: 10
dns:
# disable: 1 If you want to disable DNS resolution by Gungho
lib/Gungho/Engine/POE.pm view on Meta::CPAN
If you feel like all of your other settings are correct but the actual
HTTP fetch is taking too long, try setting this number to something higher.
By default this is set to 2.
=head2 keepalive.keep_alive
Specifies the number of seconds to keep a connection in the Keepalive
connection manager.
This is an important option to tweak if you're using proxies. Even though
you might be accessing thousands of different URLs, POE will think that
you are in fact trying to connect to the same host because you're
lib/Gungho/Engine/POE.pm view on Meta::CPAN
See L<ENVIRONMENT VARIABLES|ENVIRONMENT VARIABLES> for details
=head1 USING KEEPALIVE
Gungho::Engine::POE uses PoCo::Client::Keepalive to control the connections.
For the most part this has no visible effect on the user, but the "timeout"
parameter dictate exactly how long the component waits for a new connection
which means that, after finishing to fetch all the requests the engine
waits for that amount of time before terminating. This is NORMAL.
view all matches for this distribution
view release on metacpan or search on metacpan
#for win95 debugging purposes
# @lvdisplay = `type $lvname.vgtest`;
LVDATALINE: foreach $lvdataline (@lvdisplay) {
#attempt at keepalive timeout prevention below
#attempt at stoping browser timeout print "<B></B>";
if ($lvdataline =~ /^ --- Logical extents ---/) {
#
# Were done summ it up
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Blitz.pm view on Meta::CPAN
The third reason relates to my frustration with L<HTML::Zoom>'s performance.
When I was struggling with L<HTML::Zoom>, fruitlessly trying to come up with
ways to optimize or work around its code, I remembered a funny coincidence: It
just so happens that (Professor) Zoom is the name of a supervillain in the
superhero comic books published by DC Comics. He is the archenemy of the Flash
("the fastest man alive"), whose main ability is super-speed. When the Flash
comics were published in Germany in the 1970s and 1980s, his name was
translated as I<der Rote Blitz> ("the Red Flash"). Thus: "Blitz" is the hero
that triumphs over "Zoom" through superior speed. :-)
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
examples/unicode/script/unicode_server.pl view on Meta::CPAN
my $debug = 0;
my $fork = 0;
my $help = 0;
my $host = undef;
my $port = $ENV{UNICODE_PORT} || $ENV{CATALYST_PORT} || 3000;
my $keepalive = 0;
my $restart = $ENV{UNICODE_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
my $restart_delay = 1;
my $restart_regex = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$';
my $restart_directory = undef;
my $follow_symlinks = 0;
examples/unicode/script/unicode_server.pl view on Meta::CPAN
'debug|d' => \$debug,
'fork' => \$fork,
'help|?' => \$help,
'host=s' => \$host,
'port=s' => \$port,
'keepalive|k' => \$keepalive,
'restart|r' => \$restart,
'restartdelay|rd=s' => \$restart_delay,
'restartregex|rr=s' => \$restart_regex,
'restartdirectory=s@' => \$restart_directory,
'followsymlinks' => \$follow_symlinks,
examples/unicode/script/unicode_server.pl view on Meta::CPAN
require unicode;
unicode->run( $port, $host, {
argv => \@argv,
'fork' => $fork,
keepalive => $keepalive,
restart => $restart,
restart_delay => $restart_delay,
restart_regex => qr/$restart_regex/,
restart_directory => $restart_directory,
follow_symlinks => $follow_symlinks,
examples/unicode/script/unicode_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
view release on metacpan or search on metacpan
use_ok('HTML::Gumbo');
# Test for memory leak in tree mode (rt.cpan.org #128667).
# Before the fix, parse_to_tree_cb leaked the root document SV on
# every parse call, keeping the entire tree alive after undef.
my $parser = HTML::Gumbo->new;
{
my $tree = $parser->parse(<<'END', format => 'tree');
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/stress.pl view on Meta::CPAN
usage() unless $limit =~ /^\d+$/;
$uri = 'http://' . $uri unless $uri =~ m#^http://#;
my $ua = LWP::UserAgent->new(env_proxy => 1,
keep_alive => 1,
timeout => 30,
);
my $count = 0;
while( 1 ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/14a-fake_apache.t view on Meta::CPAN
'HTTP_KEEP_ALIVE' => '300',
'GATEWAY_INTERFACE' => 'CGI-Perl/1.1',
'DOCUMENT_ROOT' => '/usr/local/bricolage/comp',
'HTTP_REFERER' => 'http://localhost/',
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_COOKIE' => 'FOO=BAR; HEY=You',
'HTTP_HOST' => 'localhost',
'AUTH_TYPE' => 'Something',
'CONTENT_TYPE' => 'text/html',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Object/XPath/Step.pm view on Meta::CPAN
{
$self->{pp}->_set_context_pos( $i );
# Capture the intermediate NodeSet in a lexical variable and release
# it immediately after appending its nodes to $initial_nodeset.
# Without this, the temporary NodeSet returned by evaluate_node()
# would stay alive until the end of the for() scope, causing
# accumulated memory pressure when $from is large (e.g. after a
# descendant-or-self step that returns every node in the document).
{
my $tmp = $self->evaluate_node( $from->get_node( $i ) );
$initial_nodeset->append( $tmp );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Robot/Scrapper.pm view on Meta::CPAN
return {
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding' => 'gzip, deflate',
'Accept-Language' => 'en-US,en;q=0.5',
'Cache-Control' => 'no-cache',
'Connection' => 'keep-alive',
'Content-Length' => length( POST('url...', [], Content => $form)->content ),
'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8',
'DNT' => '1',
'Host' => 'www.fipe.org.br',
'Pragma' => 'no-cache',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/TableLayout/Symbols.pm view on Meta::CPAN
sub submit { return HTML::TableLayout::FormComponent::Submit->new(@_) }
##
## These are callbacks for debugging. Currently, most calls to the
## NOTER() are removed. However, the OOPSER() is very much alive.
## The OOPSER can be pretty much any code reference that takes, as
## its first argument, a string explaining what the "oops" was about.
## By default this is warn(full_trace()); croak(@_);, but you may wish
## to override this behavior for your application. I have a
## database-app that needs to do stuff like rollback the transaction
view all matches for this distribution