Mojo::IOLoop::Trigger man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Mojo::IOLoop::Trigger(User Contributed Perl DocumentatMojo::IOLoop::Trigger(3)

NAME
       Mojo::IOLoop::Trigger - IOLoop Trigger

SYNOPSIS
	 use Mojo::IOLoop::Trigger;

	 # Synchronize multiple events
	 my $t = Mojo::IOLoop::Trigger->new;
	 $t->on(done => sub { print "BOOM!\n" });
	 for my $i (1 .. 10) {
	   $t->begin;
	   Mojo::IOLoop->timer($i => sub {
	     print 10 - $i, "\n";
	     $t->end;
	   });
	 }

	 # Stop automatically when done
	 $t->start;

DESCRIPTION
       Mojo::IOLoop::Trigger is a remote control for Mojo::IOLoop.  Note that
       this module is EXPERIMENTAL and might change without warning!

EVENTS
       Mojo::IOLoop::Trigger can emit the following events.

   "done"
       Emitted once the active event counter reaches zero.

ATTRIBUTES
       Mojo::IOLoop::Trigger implements the following attributes.

   "ioloop"
	 my $ioloop = $t->ioloop;
	 $t	    = $t->ioloop(Mojo::IOLoop->new);

       Loop object to control, defaults to a Mojo::IOLoop object.

METHODS
       Mojo::IOLoop::Trigger inherits all methods from
       Mojo::IOLoop::EventEmitter and implements the following new ones.

   "begin"
	 my $cb = $t->begin;

       Increment active event counter, the returned callback can be used
       instead of "end".

	 my $t = Mojo::IOLoop->trigger;
	 Mojo::IOLoop->resolver->lookup('mojolicio.us' => $t->begin);
	 my $address = $t->start;

   "end"
	 $t->end;
	 $t->end(@args);

       Decrement active event counter.

   "start"
	 my @args = $t->start;

       Start "ioloop" and register "done" event that stops it again once the
       active event counter reaches zero.

SEE ALSO
       Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.

perl v5.14.1			  2011-09-13	      Mojo::IOLoop::Trigger(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net