Created
September 29, 2011 21:45
-
-
Save reyjrar/1252023 to your computer and use it in GitHub Desktop.
MooseX::POE Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------# | |
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