Skip to content

Instantly share code, notes, and snippets.

@reyjrar
Created September 29, 2011 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reyjrar/1252023 to your computer and use it in GitHub Desktop.
Save reyjrar/1252023 to your computer and use it in GitHub Desktop.
MooseX::POE Testing
#------------------------------------------------------------------------#
package base;
use MooseX::POE;
with qw( MooseX::POE::Aliased );
event process => sub {
my ($self,$thing) = @_[OBJECT,ARG0];
print "base::process called with $thing\n";
};
#------------------------------------------------------------------------#
package base::extended;
use MooseX::POE;
extends 'base';
has dbconn => (
isa => 'Str',
is => 'ro',
required => 1,
);
#------------------------------------------------------------------------#
package base::awesome;
use MooseX::POE;
extends 'base::extended';
after 'process' => sub {
my($self,$thing) = @_[OBJECT,ARG0];
print "base::awesome::process adding value, $thing\n";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment