Subject: | syntax errors in SYNOPSIS example |
The sample code doesn't actually work, since it doesn't properly case
POE, and omits a semicolon at the end of the last event definition.
Here's a patch that fixes both, and I also took the liberty of making
the example actually print something.
--- lib/MooseX/POE.pm.orig 2007-12-12 13:47:18.000000000 -0800
+++ lib/MooseX/POE.pm 2007-12-12 13:48:36.000000000 -0800
@@ -85,7 +85,7 @@
=head1 SYNOPSIS
package Counter;
- use MooseX::Poe;
+ use MooseX::POE;
has name => (
isa => 'Str',
@@ -107,11 +107,12 @@
event increment => sub {
my ($self) = @_;
+ print "Count is now " . $self->count . "\n";
$self->count( $self->count + 1 );
$self->yield('increment') unless $self->count > 3;
- }
+ };
- no MooseX::Poe;
+ no MooseX::POE;
Counter->new();
POE::Kernel->run();