view release on metacpan or search on metacpan
--exec "perl -Ilib -MTest::Flatten -MTest::Name::FromLine"
--timer
--merge
--trap
--color
-w
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Memcached/AnyEvent.pm view on Meta::CPAN
if ($self->{auto_reconnect} > $self->{_connect_attempts}->{ $server }++) {
# XXX this watcher holds a reference to $self, which means
# it will make your program wait for it to fire until
# auto_reconnect attempts have been made.
# if you need to close immediately, you need to call disconnect
$self->{_reconnect}->{$server} = AE::timer $self->{reconnect_delay}, 0, sub {
delete $self->{_reconnect}->{$server};
$self->_connect_one($server);
};
}
} else {
lib/Cache/Memcached/AnyEvent.pm view on Meta::CPAN
}
my $cb = shift @{$self->{queue}};
return unless $cb;
my $guard = AnyEvent::Util::guard {
my $t; $t = AE::timer 0, 0, sub {
$self->{_is_draining}--;
undef $t;
$self->_drain_queue;
};
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Profile.pm view on Meta::CPAN
my ( $self, $class ) = @_;
$self->SUPER::isa($class) or $self->cache->isa($class);
}
my @timer_names = qw(hit get set miss);
sub timer_names { @timer_names }
foreach my $method ( "all", @timer_names ) {
my $count = "call_count_$method";
has $count => (
traits => [qw(Counter)],
isa => "Num",
lib/Cache/Profile.pm view on Meta::CPAN
}
sub reset {
my $self = shift;
foreach my $method ( $self->timer_names ) {
foreach my $measure ( qw(real cpu) ) {
$self->${\"reset_${method}_${measure}"};
}
$self->${\"reset_call_count_$method"};
}
lib/Cache/Profile.pm view on Meta::CPAN
if ( $self->hit_count ) {
$report .= sprintf "Hit rate: %0.2f%% (%d/%d)\n", ( $self->hit_rate * 100 ), $self->hit_count, $self->query_count;
}
foreach my $method ( $self->timer_names, "all" ) {
if ( my $calls = $self->${\"call_count_$method"} ) {
my %times;
foreach my $measure ( qw(real cpu) ) {
$times{$measure} = $self->${\"total_${measure}_time_${method}"};
}
lib/Cache/Profile.pm view on Meta::CPAN
If the overhead of C<get> and C<set> is higher, this will be bigger than 1.
=item reset
Resets the counters/timers.
=back
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Sliding.pm view on Meta::CPAN
L1 => {},
L2 => {},
t => undef,
};
weaken(my $this = $self);
$self->{t} = EV::timer $expire_after, $expire_after, sub { if ($this) {
$this->{L2} = $this->{L1};
$this->{L1} = {};
} };
return bless $self, $class;
}
lib/Cache/Sliding.pm view on Meta::CPAN
Implement caching object using sliding time-based expiration strategy
(data in the cache is invalidated by specifying the amount of time the
item is allowed to be idle in the cache after last access time).
Use EV::timer, so this module only useful in EV-based applications,
because cache expiration will work only while you inside EV::loop.
=head1 INTERFACE
view all matches for this distribution
view release on metacpan or search on metacpan
t/file_fifo.t view on Meta::CPAN
use Carp;
$SIG{__DIE__} = sub { confess @_; };
# This test suite requires total accuracy in ordering of removals over a short
# time period, so a higher resolution timer is required.
eval { require Time::HiRes }
or plan skip_all => 'Time::HiRes is required for this test.';
Time::HiRes->export('Cache::File', 'time');
Time::HiRes->export('Cache::File::Entry', 'time');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CallBackery/Controller/RpcService.pm view on Meta::CPAN
my $key = shift;
my $cb = shift;
if (not $self->{preDestroyActions}){
# we want to run these pretty soon, basically as soon as
# controll returns to the ioloop
Mojo::IOLoop->timer("0.2" => sub{ $self->$runPreDestroyActions });
}
$self->{preDestroyActions}{$key} = $cb;
}
=head2 handleUpload
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Callback/Frame.pm view on Meta::CPAN
Consider the following piece of B<broken> code:
use AnyEvent;
eval {
$watcher = AE::timer 0.1, 0,
sub {
die "some error";
};
};
lib/Callback/Frame.pm view on Meta::CPAN
use AnyEvent;
use Callback::Frame;
frame_try {
$watcher = AE::timer 0.1, 0, fub {
die "some error";
};
} frame_catch {
print STDERR "Oops: $@";
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Captive/Portal/Role/Firewall.pm view on Meta::CPAN
###########################################################
###########################################################
###########################################################
# packets seen from this client within last IDLE_TIME period?
# the capo_activity_ipset has the internal countdown timer
# set with IDLE_TIME, great thanks to the ipset developers!
###########################################################
next if exists $fw_activity->{$ip};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carrot/Individuality/Singular/Process/Nested_Alarm.pm view on Meta::CPAN
{
use strict;
use warnings 'FATAL' => 'all';
use Time::HiRes qw(
getitimer
ITIMER_REAL
setitimer
);
my $expressiveness = Carrot::individuality;
$expressiveness->provide(
my $epoch_time = '::Individuality::Singular::Process::Epoch_Time',
lib/Carrot/Individuality/Singular/Process/Nested_Alarm.pm view on Meta::CPAN
$alarm = IS_FALSE;
my $former = [$$epoch_time, 0];
if ($#$this > ADX_NO_ELEMENTS)
{
my $remaining = getitimer(ITIMER_REAL);
if ($seconds < $remaining)
{
$former->[IDX_NST_REMAINING] = $remaining;
setitimer(ITIMER_REAL, $seconds);
}
} else {
setitimer(ITIMER_REAL, $seconds);
}
push(@$this, $former);
return($#$this);
}
lib/Carrot/Individuality/Singular/Process/Nested_Alarm.pm view on Meta::CPAN
my $former = pop(@$this);
if ($former->[1] > 0)
{
my $remaining = $former->[IDX_NST_REMAINING] - ($$epoch_time - $former->[IDX_NST_THEN]);
$remaining = 0.01 if ($remaining <= 0);
setitimer(ITIMER_REAL, $remaining);
}
if ($#$this == ADX_NO_ELEMENTS)
{
setitimer(ITIMER_REAL, 0);
$alarm = IS_FALSE; # reminder only
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cassandra/Client.pm view on Meta::CPAN
my ($self, $command, $callback, $args, $command_info)= @_;
$command_info->{retries}++;
my $delay= 0.1 * (2 ** $command_info->{retries});
$self->{async_io}->timer(sub {
if ($self->{active_queries} >= $self->{options}{max_concurrent_queries}) {
$self->_command_enqueue($command, $callback, $args, $command_info);
} else {
$self->_command_slowpath($command, $callback, $args, $command_info);
}
lib/Cassandra/Client.pm view on Meta::CPAN
=item max_connections
Maximum amount of connections to keep open in the Cassandra connection pool. Defaults to C<2> for historical reasons, raise this if appropriate.
=item timer_granularity
Timer granularity used for timeouts. Defaults to C<0.1> (100ms). Change this if you're setting timeouts to values lower than a second.
=item request_timeout
view all matches for this distribution
view release on metacpan or search on metacpan
},
);
$blinker->bring_to_front;
my $blinkstate = 0;
my $blinkcolor = 16;
my $timer = Prima::Timer->new(
timeout => 100,
onTick => sub {
my $self = shift;
if ( $blinkcolor == 8 && $countdown_to_hide > 0 ) {
# green waits and hides the blinker
$c = (( $c << 4 ) | 0x80) << $blinkcolor;
$c |= ( $c >> 8 ) if $c > 0x10000; # makes it yellow, as red doesn't blink at all
$blinker->backColor($c);
},
);
$timer->start;
my $reader = Prima::File->new(
file => $r,
mask => fe::Read(),
onRead => sub {
my $cmd = <$r>;
if ( $cmd eq 'start' ) {
$blinkstate = 0;
$countdown_to_hide = 32;
$blinkcolor = 8;
} elsif ( $cmd eq 'stop') {
$timer->start;
$blinkstate = 0;
$blinkcolor = 16;
$blinker->backColor(0x808000);
$blinker->show;
$blinker->bring_to_front;
} elsif ( $cmd eq 'fail') {
$blinker->backColor(cl::LightRed());
$blinker->show;
$blinker->bring_to_front;
$timer->stop;
}
},
);
run Prima;
exit;
view all matches for this distribution
view release on metacpan or search on metacpan
share/ext/ext-all-debug.js view on Meta::CPAN
interval : 20,
delay: 250,
preventDefault : true,
stopDefault : false,
timer : 0,
enable: function(){
if(this.disabled){
this.el.on('mousedown', this.handleMouseDown, this);
share/ext/ext-all-debug.js view on Meta::CPAN
},
disable: function( force){
if(force || !this.disabled){
clearTimeout(this.timer);
if(this.pressClass){
this.el.removeClass(this.pressClass);
}
Ext.getDoc().un('mouseup', this.handleMouseUp, this);
this.el.removeAllListeners();
share/ext/ext-all-debug.js view on Meta::CPAN
Ext.destroy(this.el);
this.purgeListeners();
},
handleDblClick : function(e){
clearTimeout(this.timer);
this.el.blur();
this.fireEvent("mousedown", this, e);
this.fireEvent("click", this, e);
},
handleMouseDown : function(e){
clearTimeout(this.timer);
this.el.blur();
if(this.pressClass){
this.el.addClass(this.pressClass);
}
this.mousedownTime = new Date();
share/ext/ext-all-debug.js view on Meta::CPAN
if (this.accelerate) {
this.delay = 400;
}
this.timer = this.click.defer(this.delay || this.interval, this, [e]);
},
click : function(e){
this.fireEvent("click", this, e);
this.timer = this.click.defer(this.accelerate ?
this.easeOutExpo(this.mousedownTime.getElapsed(),
400,
-390,
12000) :
this.interval, this, [e]);
share/ext/ext-all-debug.js view on Meta::CPAN
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
handleMouseOut : function(){
clearTimeout(this.timer);
if(this.pressClass){
this.el.removeClass(this.pressClass);
}
this.el.on("mouseover", this.handleMouseReturn, this);
},
share/ext/ext-all-debug.js view on Meta::CPAN
this.click();
},
handleMouseUp : function(e){
clearTimeout(this.timer);
this.el.un("mouseover", this.handleMouseReturn, this);
this.el.un("mouseout", this.handleMouseOut, this);
Ext.getDoc().un("mouseup", this.handleMouseUp, this);
this.el.removeClass(this.pressClass);
this.fireEvent("mouseup", this, e);
share/ext/ext-all-debug.js view on Meta::CPAN
mouseup: this.onMouseUp,
mousemove: this.onMouseMove,
selectstart: this.stopSelect
});
if(this.autoStart){
this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this, [e]);
}
}
},
onMouseMove: function(e, target){
share/ext/ext-all-debug.js view on Meta::CPAN
this.onStart(e);
this.fireEvent('dragstart', this, e);
},
clearStart : function() {
if(this.timer){
clearTimeout(this.timer);
delete this.timer;
}
},
stopSelect : function(e) {
e.stopEvent();
share/ext/ext-all-debug.js view on Meta::CPAN
};
Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
expand : function(deep, anim, callback, scope){
if(this.loading){
var timer;
var f = function(){
if(!this.loading){
clearInterval(timer);
this.expand(deep, anim, callback, scope);
}
}.createDelegate(this);
timer = setInterval(f, 200);
return;
}
if(!this.loaded){
if(this.fireEvent("beforeload", this) === false){
return;
view all matches for this distribution
view release on metacpan or search on metacpan
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
my $driver = $client->{wheel}->[ $client->{wheel}->DRIVER_BOTH ];
my $buffer_ref = $driver->get( $handle );
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};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod view on Meta::CPAN
TEMPLATE_EXTENSION => '.tt2',
# Set the location for TT files
INCLUDE_PATH => [
MyApp->path_to( 'root', 'src' ),
],
# Set to 1 for detailed timer stats in your HTML as comments
TIMER => 0,
# This is your wrapper template located in the 'root/src'
WRAPPER => 'wrapper.tt2',
);
view all matches for this distribution
view release on metacpan or search on metacpan
}
$conf{global} = $conf{override}->{timeout};
}
}
# special case - allow for disable global timer
if ( exists $conf{global}
&& $conf{global} != 0 )
{
my $timeout = $conf{global};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Snippets.pm view on Meta::CPAN
then you can make use of this data to report progress to the user:
$c->snippet( progress => $task_id => ++$progress )
if ( $output =~ /made_progress/ );
Meanwhile, javascript code with timers could periodically poll the server using
an ajax request to update the progress level. To expose this data to the client
create an action somewhere:
sub progress : Local {
my ( $self, $c ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Response.pm view on Meta::CPAN
sub anyevent :Local :Args(0) {
my ($self, $c) = @_;
my $cb = $self->prepare_cb($c->res->write_fh);
my $watcher;
$watcher = AnyEvent->timer(
after => 5,
cb => sub {
$cb->(scalar localtime);
undef $watcher; # cancel circular-ref
});
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"libtemplate-plugin-javascript-perl", "Template-Plugin-JavaScript", "not-uploaded", "0", "0"
"libtemplate-plugin-textile2-perl", "Template-Plugin-Textile2", "1.21", "0", "0"
"libtemplate-plugin-yaml-perl", "Template-Plugin-YAML", "1.23", "0", "0"
"libtemplate-provider-encoding-perl", "Template-Provider-Encoding", "0.10", "0", "0"
"libtemplate-provider-fromdata-perl", "Template-Provider-FromDATA", "0.08", "0", "0"
"libtemplate-timer-perl", "Template-Timer", "1.00", "1", "0"
"libterm-progressbar-perl", "Term-ProgressBar", "2.09", "0", "1"
"libterm-query-perl", "Term-Query", "2.0", "0", "0"
"libterm-readkey-perl", "TermReadKey", "2.30", "0", "0"
"libterm-readline-gnu-perl", "Term-ReadLine-Gnu", "1.19", "3", "0"
"libterm-readline-perl-perl", "Term-ReadLine-Perl", "1.0302", "0", "0"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/Semantic.pod~ view on Meta::CPAN
=item Animation
use AnyEvent; # and/or Coro
my $e = Math::SegmentedEnvelope->new(is_morph => 1);
my $v = 0; # some property
my $w = AE::timer(0, 1/60, sub { # refresh $v with 60Hz rate
state $s = $e->static; # get static evaluator
state $started = AE::now;
$v = $s->(AE::now - $started); # or $e->at(..) if $e can be altered somewhere
});
my $k = AE::timer(10, 0, sub { undef $w }); # kill previous timer after 10secs
my $i = AE::idle(sub { ... }); # animate $v using OpenGL, SDL and etc..
AE::cv->recv;
=item visual representation of arbitrary definition
view all matches for this distribution
view release on metacpan or search on metacpan
- Updated for Catalyst 5.5
- Fix docs
- Added TEMPLATE_SUFFIX config variable
0.14 Fri Oct 21 10:20:00 2005
- Turn timer off by default, even for debug.
- removed superflous 'templates' inside 'root'
- made it possible to forward to the message action by
passing the message in the stash. (example)
- Updated docs to show correct config syntax.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CMS/tt/static/js/cms.js view on Meta::CPAN
CMS.RenameDialog.render(document.body);
Logger("dialogs rendered");
}
CMS.lock_timer = function() {
if (!CMS.LOCK_EXPIRES) {
Logger('lock expired');
return;
}
lib/CatalystX/CMS/tt/static/js/cms.js view on Meta::CPAN
out += mins +" minute"+((mins!=1)?"s":"")+", ";
}
out += secs +" seconds";
Dom.get('countbox').innerHTML=out;
setTimeout(CMS.lock_timer, 1000);
}
}
/* nearly verbatim from
http://developer.yahoo.com/yui/examples/layout/page_layout.html
lib/CatalystX/CMS/tt/static/js/cms.js view on Meta::CPAN
}
else if (Dom.get('editor')) {
CMS.init_plain_editor();
}
CMS.init_admin_links();
CMS.lock_timer();
CMS.init_tree();
}
YAHOO.util.Event.onDOMReady( CMS.setup_page );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
Latrobe
latter
latterly
lattice
lattices
Lattimer
Latvia
laudable
Lauderdale
Laue
laugh
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
mortification
mortified
mortifies
mortify
mortifying
Mortimer
Morton
mosaic
mosaics
Moscone
Moscow
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
timelessly
timelessness
timely
timeout
timeouts
timer
timers
times
timeshare
timeshares
timesharing
timestamp
view all matches for this distribution