Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 85947
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: MMCLERIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem with applying Moo role with multi-before declaration to Moose class
The following code fails with this error: Show quoted text
> Can't use string ("bar") as a subroutine ref while "strict refs" in use at /Users/mmcleric/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.3/darwin-2level/Class/MOP/Class.pm line 1079.
Show quoted text
> package R1; > use Moo::Role; > > before 'foo', 'bar' => sub { > print "before\n"; > }; > > package main; > use Moose; > with 'R1'; > > sub foo {} > sub bar {} > > main->foo;
If I replace "use Moose" with "use Moo", it works as expected. I'm using the latest versions of all relevant modules: Moo-1.002, Role::Tiny-1.002005, Class::Method::Modifiers-2.04, Moose-2.0802. My perl version is 5.16.3.
Fixed pushed to multiple-modifier-inflation branch.
Fixed in 1.003000