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
view release on metacpan or search on metacpan
root/static/js/yui/build/get/get-min.js view on Meta::CPAN
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.0
*/
YAHOO.util.Get=function(){var I={},H=0,B=0,O=false,A=YAHOO.env.ua,D=YAHOO.lang;var Q=function(U,R,V){var S=V||window,W=S.document,X=W.createElement(U);for(var T in R){if(R[T]&&YAHOO.lang.hasOwnProperty(R,T)){X.setAttribute(T,R[T]);}}return X;};var N=...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Restarter/GTK.pm view on Meta::CPAN
$self->_fork_and_start;
}
);
if ($self->auto_restart) {
my $timer = AnyEvent->timer(
after => 1,
interval => 1,
cb => sub {
if (my @events = $self->_watcher->new_events) {
$self->_handle_events(@events);
lib/CatalystX/Restarter/GTK.pm view on Meta::CPAN
my $win = WinMonitor->new($self->application_name);
$win->set_restart_handler(sub { kill SIGUSR1, getppid; });
my ($watcher, $start_timer);
# Creates event watcher for checking socket readiness of forked server.
$start_timer = sub {
$watcher = AnyEvent->timer(
after => 1,
cb => sub {
AnyEvent::Socket::tcp_connect('localhost', $self->port, sub {
if (shift) {
$watcher = undef;
$win->set_status('started');
}
else {
# Restart timer upon failure
$watcher = $start_timer->();
}
});
}
);
};
lib/CatalystX/Restarter/GTK.pm view on Meta::CPAN
signal => SIGUSR1,
cb => sub {
$win->clear_msg;
$win->set_status('starting');
$win_sock->say('1');
$start_timer->();
}
);
# SIGUSR2 - Server exited / killed
my $usr2_watcher = AnyEvent->signal(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Centrifugo/Client.pm view on Meta::CPAN
# on Connect, the client_id must be read (if available)
if ($body && ref($body) eq 'HASH' && $body->{client}) {
$this->{CLIENT_ID} = $body->{client};
$this->_debug( "Centrifugo::Client : CLIENT_ID=".$this->{CLIENT_ID} );
}
$this->_init_keep_alive_timer() if $this->{MAX_ALIVE};
$this->_reset_reconnect_sequence();
$this->_resubscribe() if $this->{RESUBSCRIBE};
}
# This function is called when client receives a message
lib/Centrifugo/Client.pm view on Meta::CPAN
sub _reconnect {
my ($this) = @_;
my $retry_after = $this->{_next_retry} > $this->{MAX_RETRY} ? $this->{MAX_RETRY} : $this->{_next_retry};
$retry_after = int($retry_after) if $retry_after > 3;
$this->_debug( "Centrifugo::Client : will reconnect after $retry_after s." );
$this->{reconnect_handler} = AnyEvent->timer(
after => $retry_after,
cb => sub {
$this->{_next_retry} += $this->{_last_retry};
$this->{_last_retry} = $retry_after;
$this->_connect();
}
);
}
# Creates the timer to send periodic ping
sub _init_keep_alive_timer {
my ($this) = @_;
$this->{_alive_handler} = AnyEvent->timer(
after => $this->{REFRESH},
interval => $this->{REFRESH},
cb => sub {
my $late = time() - $this->{_last_alive_message};
if ($late > $this->{MAX_ALIVE}) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/001_parse/logs_metricfilter.res
t/001_parse/logs_subscriptionfilter.res
t/001_parse/opsworks_app.res
t/001_parse/opsworks_elbattachment.res
t/001_parse/opsworks_instance.res
t/001_parse/opsworks_instance_timer.res
t/001_parse/opsworks_layer.res
t/001_parse/opsworks_stack.res
t/001_parse/opsworks_userprofile.res
t/001_parse/opsworks_volume.res
t/001_parse/rds_clusterparametergroup.res
view all matches for this distribution
view release on metacpan or search on metacpan
$xmgrace->{Pipe}->open("> ". $xmgrace->npipe) or
die "Can't open named pipe: $!";
} elsif (defined $pid) {
# Child
exec 'xmgrace -noask -npipe '.$xmgrace->npipe . ' -timer 900';
} else {
die "Can't fork: $!\n";
}
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
share/plotly.js/plotly.min.js view on Meta::CPAN
* plotly.js v2.14.0
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
share/plotly.js/plotly.min.js view on Meta::CPAN
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=ne...
/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
!function(t,r,n){r[t]=r[t]||n(),void 0!==e&&e.exports&&(e.exports=r[t])}("Promise",void 0!==t?t:this,(function(){"use strict";var t,e,n,i=Object.prototype.toString,a=void 0!==r?function(t){return r(t)}:setTimeout;try{Object.defineProperty({},"x",{}),...
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
share/plotly.js/plotly.min.js view on Meta::CPAN
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/
var n,i=t("./lib/build-log"),a=t("./lib/epsilon"),o=t("./lib/intersecter"),s=t("./lib/segment-chainer"),l=t("./lib/segment-selector"),c=t("./lib/geojson"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.p...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
view all matches for this distribution
view release on metacpan or search on metacpan
die "Can't open named pipe: $!";
} elsif (defined $pid) {
# Child
exec 'xmgr -noask -npipe '.$xmgr->npipe . ' -timer 900';
} else {
die "Can't fork: $!\n";
}
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chatbot/Alpha.pm view on Meta::CPAN
$self->debug ("Saving this as last msg...");
$self->{users}->{$id}->{that} = $simple;
$self->{users}->{$id}->{last} = $msg;
$self->{users}->{$id}->{hold} ||= 0;
# Reset the loop timer.
$self->{loops} = 0;
# There SHOULD be a reply now.
# So, return it.
return $reply;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chess/Opening/ECO.pm view on Meta::CPAN
},
},
'r2q1knr/pppb1Bpp/1b1p4/n7/3PP3/2N2N2/P1Q2PPP/R1B2RK1 b -' => {
eco => 'C51',
# TRANSLATORS: C51: 1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. b4 Bxb4 5. c3 Bc5 6. d4 exd4 7. O-O d6 8. cxd4 Bb6 9. Nc3 Bg4 10. Qa4 Bd7 11. Qb3 Na5 12. Bxf7+ Kf8 13. Qc2
variation => N__('Evans Gambit: Fraser-Mortimer Attack'),
moves => {
},
},
'r1bqk1nr/ppp2ppp/1bnp4/3P4/2B1P3/5N2/P4PPP/RNBQ1RK1 b kq' => {
eco => 'C51',
lib/Chess/Opening/ECO.pm view on Meta::CPAN
},
},
'r1bqkb1r/ppppnppp/5n2/1B2p3/4P3/3P1N2/PPP2PPP/RNBQK2R w KQkq' => {
eco => 'C65g',
# TRANSLATORS: C65g: 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Ne7
variation => N__('Spanish: Berlin, Mortimer Variation'),
moves => {
'f3e5' => 1,
},
},
'r1bqkb1r/ppppnppp/5n2/1B2N3/4P3/3P4/PPP2PPP/RNBQK2R b KQkq' => {
eco => 'C65g',
# TRANSLATORS: C65g: 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Ne7 5. Nxe5
variation => N__('Spanish: Berlin, Mortimer Variation'),
moves => {
'c7c6' => 1,
},
},
'r1bqkb1r/pp1pnppp/2p2n2/1B2N3/4P3/3P4/PPP2PPP/RNBQK2R w KQkq' => {
eco => 'C65g',
# TRANSLATORS: C65g: 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Ne7 5. Nxe5 c6
variation => N__('Spanish: Berlin, Mortimer Trap'),
moves => {
},
},
'r1bqkb1r/ppp2ppp/2np1n2/1B2p3/4P3/3P1N2/PPP2PPP/RNBQK2R w KQkq' => {
eco => 'C65h',
view all matches for this distribution
view release on metacpan or search on metacpan
share/Opening.db view on Meta::CPAN
{"r1bqkbnr/pp1ppppp/2n5/2p5/4PP2/2N5/PPPP2PP/R1BQKBNR b KQkq -":"Sicilian: Grand Prix attack","rnbqk1nr/ppp1ppbp/3p2p1/8/3PP3/2N1B3/PPP2PPP/R2QKBNR b KQkq -":"Pirc-Robatsch","rnbqkbnr/ppp2ppp/8/3p4/3Np3/3P4/PPP1PPPP/RNBQKB1R b KQkq -":"Alekhine's def...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chouette.pm view on Meta::CPAN
Returns the L<Log::Defer> object associated with the request:
$c->logger->info("some stuff is happening");
{
my $timer = $c->logger->timer('doing big_computation');
big_computation();
}
See the L<Log::Defer> docs for more details. For viewing the log messages, check out L<Log::Defer::Viz>.
view all matches for this distribution
view release on metacpan or search on metacpan
docs/TemplateConstraint.pm view on Meta::CPAN
# can set this parameter and wait() will return it's current value
# to the caller.
'wait' => 0,
# ``timer'' is an optional timer, a lot of constraints use it.
'timer' => new Schedule::Chronic::Timer ('down'),
}, $class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Easy.pm view on Meta::CPAN
sub stash_name ($) { (get_coderef_info($_[0]))[0] }
sub sub_name ($) { (get_coderef_info($_[0]))[1] }
sub sub_fullname ($) { join '::', get_coderef_info($_[0]) }
our @EXPORT = qw(has try_to_use try_to_use_quiet try_to_use_inc try_to_use_inc_quiet make_accessor timer);
our @EXPORT_OK = qw(sub_name stash_name sub_fullname get_coderef_info);
our %EXPORT_FOREIGN = (
'Class::Easy::Log' => [qw(debug critical debug_depth logger catch_stderr release_stderr)],
# 'Class::Easy::Timer' => [qw(timer)],
);
our $LOG = '';
sub timer {
return Class::Easy::Timer->new (@_);
}
sub import {
my $mypkg = shift;
lib/Class/Easy.pm view on Meta::CPAN
SYNOPSIS
# automatic loading of strict, warnings and utf8, like common::sense
use Class::Easy::Import;
# or same as above + functions like 'has', 'try_to_use', 'timer' and 'logger'
use Class::Easy;
# try to load package IO::Easy, return 1 when success
try_to_use ('IO::Easy');
lib/Class/Easy.pm view on Meta::CPAN
# string "[PID] [PACKAGE(STRING)] [DBG] something" logged
debug "something";
# see documentation for Class::Easy::Timer
my $t = timer ('long operation');
# ⦠long operation
my $time = $t->lap ('another long op');
# â¦
$time = $t->end;
# $time contains time between last 'lap' or 'timer'
# and 'end' call
$time = $t->total;
# now $time contains total time between timer init
# and end call
=head1 FUNCTIONS
=head2 has ($name [, is => 'ro' | 'rw'] [, default => $default], [, global => 1])
lib/Class/Easy.pm view on Meta::CPAN
similar to the try_to_use, but check for module presence in %INC
instead of symbol table lookup.
=cut
=head2 timer
create new L<Class::Easy::Timer> object
=cut
=head2 get_coderef_info, stash_name, sub_name, sub_fullname
retrieve real name for coderef. useful for anonymous or imported functions
get_coderef_info (*{Class::Easy::timer}{CODE}); # ('Class::Easy', 'timer')
stash_name (*{Class::Easy::timer}{CODE}); # 'Class::Easy'
sub_name (*{Class::Easy::timer}{CODE}); # 'timer'
sub_fullname (*{Class::Easy::timer}{CODE}); # 'Class::Easy::timer'
=cut
=head2 list_all_subs_for, list_local_subs_for
lib/Class/Easy.pm view on Meta::CPAN
'make_accessor' => 'make_accessor',
'try_to_use' => 'try_to_use',
'try_to_use_inc' => 'try_to_use_inc',
'try_to_use_quiet' => 'try_to_use_quiet',
'has' => 'has',
'timer' => 'timer',
'try_to_use_inc_quiet' => 'try_to_use_inc_quiet'
},
'Class::Easy::Log' => {
'critical' => 'critical',
'release_stderr' => 'release_stderr',
view all matches for this distribution