Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

moosex::poe::meta::trait::object(3pm) [debian man page]

MooseX::POE::Meta::Trait::Object(3pm)			User Contributed Perl Documentation		     MooseX::POE::Meta::Trait::Object(3pm)

NAME
MooseX::POE::Meta::Trait::Object - The base class role for MooseX::POE VERSION
version 0.215 SYNOPSIS
package Counter; use MooseX::Poe; has name => ( isa => 'Str', is => 'rw', default => sub { 'Foo ' }, ); has count => ( isa => 'Int', is => 'rw', lazy => 1, default => sub { 0 }, ); sub START { my ($self) = @_; $self->yield('increment'); } sub increment { my ($self) = @_; $self->count( $self->count + 1 ); $self->yield('increment') unless $self->count > 3; } no MooseX::Poe; DESCRIPTION
MooseX::POE::Meta::TraitObject is a role that is applied to the object base classe (usually Moose::Object) that implements a POE::Session. METHODS
get_session_id Get the internal POE Session ID, this is useful to hand to other POE aware functions. yield call delay alarm alarm_add delay_add alarm_set alarm_adjust alarm_remove alarm_remove_all delay_set delay_adjust A cheap alias for the same POE::Kernel function which will gurantee posting to the object's session. STARTALL Along similar lines to Moose's "BUILDALL" method which calls all the "BUILD" methods, this function will call all the "START" methods in your inheritance hierarchy automatically when POE first runs your session. (This corresponds to the "_start" event from POE.) STOPALL Along similar lines to "STARTALL", but for "STOP" instead. START STOP DEFAULT CHILD PARENT DEFAULT METHODS
PREDEFINED EVENTS
AUTHORS
o Chris Prather <chris@prather.org> o Ash Berlin <ash@cpan.org> o Chris Williams <chris@bingosnet.co.uk> o Yuval (nothingmuch) Kogman o Torsten Raudssus <torsten@raudssus.de> <http://www.raudssus.de/> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Chris Prather, Ash Berlin, Chris Williams, Yuval Kogman, Torsten Raudssus. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-04-25 MooseX::POE::Meta::Trait::Object(3pm)

Check Out this Related Man Page

POE::Component::IRC::Plugin::NickReclaim(3pm)		User Contributed Perl Documentation	     POE::Component::IRC::Plugin::NickReclaim(3pm)

NAME
POE::Component::IRC::Plugin::NickReclaim - A PoCo-IRC plugin for reclaiming your nickname SYNOPSIS
use strict; use warnings; use POE qw(Component::IRC Component::IRC::Plugin::NickReclaim); my $nickname = 'Flibble' . $$; my $ircname = 'Flibble the Sailor Bot'; my $ircserver = 'irc.blahblahblah.irc'; my $port = 6667; my $irc = POE::Component::IRC->spawn( nick => $nickname, server => $ircserver, port => $port, ircname => $ircname, ) or die "Oh noooo! $!"; POE::Session->create( package_states => [ main => [ qw(_start) ], ], ); $poe_kernel->run(); sub _start { $irc->yield( register => 'all' ); # Create and load our NickReclaim plugin, before we connect $irc->plugin_add( 'NickReclaim' => POE::Component::IRC::Plugin::NickReclaim->new( poll => 30 ) ); $irc->yield( connect => { } ); return; } DESCRIPTION
POE::Component::IRC::Plugin::NickReclaim - A POE::Component::IRC plugin automagically deals with your bot's nickname being in use and reclaims it when it becomes available again. It registers and handles 'irc_433' events. On receiving a 433 event it will reset the nickname to the 'nick' specified with "spawn" or "connect", appendedwith an underscore, and then poll to try and change it to the original nickname. If someone in your channel who has the nickname you're after quits or changes nickname, the plugin will try to reclaim it immediately. METHODS
"new" Takes one optional argument: 'poll', the number of seconds between nick change attempts, default is 30; Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. AUTHOR
Chris 'BinGOs' Williams With amendments applied by Zoffix Znet SEE ALSO
POE::Component::IRC perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::NickReclaim(3pm)
Man Page