It should work, can you perhaps distill this down into a test case which doesn't depend on IRC::Bot/POE?

- Stevan




On Feb 7, 2009, at 9:15 AM, Fayland Lam wrote:

$ cat test.pl
package IRC::Bot2;

use Moose;
extends 'IRC::Bot';

after 'bot_start' => sub {
  my $self = shift;

  no warnings;    $IRC::Bot::log =  IRC::Bot::Log2->new(
      Path          => $self->{'LogPath'},
      split_channel => 1,
      split_day     => 1,
  );
};
$ perl test.pl
The method 'bot_start' is not found in the inheritance hierarchy for class IRC::Bot2 at C:/strawberr
y/perl/site/lib/Class/MOP/Class.pm line 668
Class::MOP::Class::__ANON__('Moose::Meta::Class=HASH(0x10fe65c)', 'bot_start') called at C:/
strawberry/perl/site/lib/Class/MOP/Class.pm line 708
Class ::MOP ::Class ::add_around_method_modifier('Moose::Meta::Class=HASH(0x10fe65c)', 'bot_sta rt', 'CODE(0xb2a20c)') called at C:/strawberry/perl/site/lib/Moose/ Util.pm line 170 Moose::Util::add_method_modifier('IRC::Bot2', 'around', 'ARRAY(0x10fc7b4)') called at C:/str
awberry/perl/site/lib/Moose.pm line 101
Moose::around(undef, 'bot_start') called at C:/strawberry/perl/ site/lib/Moose/Exporter.pm li
ne 201
Moose::around('bot_start', 'CODE(0xb2a20c)') called at test.pl line 21



the code is working with Moose 0.57 but not 0.68.
anything changed?

Thanks.

--
Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // 
http://www.foorumbbs.com/

Reply via email to