Subject: | Is this bug or feature? |
Date: | Thu, 10 Oct 2013 22:54:02 +0400 |
To: | bug-moose [...] rt.cpan.org |
From: | Анатолий Гришаев <0body0 [...] rambler.ru> |
Having this code
======================
package A;
use Moose;
sub run{
my $self = shift;
inner();
$self->cleanup;
}
sub cleanup{
inner();
say STDERR "cleanup";
}
package B;
use Moose;
extends 'A';
augment run => sub {
my $self = shift;
say STDERR "B is running";
};
my $x = B->new->run();
========================
I expect the script outputs something like this:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
B is running
cleanup
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
But the script produce following:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
B is running
B is running
cleanup
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Look like a bug for me, but I am not sure.
Best regards, Anatoliy Grishaev.