POE::Session::AttributeBased - POE::Session syntax sweetener
Version 0.10
#!perl package Foo; use Test::More tests => 7; use POE; use base 'POE::Session::AttributeBased'; sub _start : State { my $k : KERNEL; my $h : HEAP; ok( 1, "in _start" ); $k->yield( tick => 5 ); } sub tick : State { my $k : KERNEL; my $count : ARG0; ok( 1, "in tick" ); return 0 unless $count; $k->yield( tick => $count - 1 ); return 1; } POE::Session->create( Foo->inline_states(), ); POE::Kernel->run(); exit;
A simple attribute handler mixin that makes POE state easier to keep track of.
Provides an attribute handler that does some bookkeeping for state handlers. There have been a few of these classes for POE. This is probably the most minimal. It supports only the inline attribute syntax. but that seems sufficient for cranking up a POE session.
The state hander attribute. Never called directly.
POE::Session argument offset handler. This use of the DB module to get extra info from caller might be risky.
Returns the list of states in a format that is usable by POE::Session->create. Can also specify what to return as the hash key so that it is useful in packages like POE::Component::Server::TCP where the state list has a different tag.
Chris Fedde, <cfedde at cpan.org>
<cfedde at cpan.org>
Please report any bugs or feature requests to bug-poe-attr at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Session-AttributeBased. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-poe-attr at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc POE::Session::AttributeBased
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/POE-Session-AttributeBased
CPAN Ratings
http://cpanratings.perl.org/d/POE-Session-AttributeBased
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Session-AttributeBased
Search CPAN
http://search.cpan.org/dist/POE-Session-AttributeBased
Copyright 2010 Chris Fedde, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install POE::Session::AttributeBased, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Session::AttributeBased
CPAN shell
perl -MCPAN -e shell install POE::Session::AttributeBased
For more information on module installation, please visit the detailed CPAN module installation guide.