Skip Menu |

This queue is for tickets about the Role-Tiny CPAN distribution.

Report information
The Basics
Id: 106668
Status: resolved
Priority: 0/
Queue: Role-Tiny

Owner: Nobody in particular
Requestors: MATTP [...]

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

Subject: BUILD modifier role composition bug
{ package ModifierRole; use Moo::Role; sub BUILD { } after BUILD => sub { print "fired\n"; }; } { package ModifierProxyRole; use Moo::Role; with 'ModifierRole'; } { package SharedRole; use Moo::Role; with 'ModifierProxyRole'; } { package Role1; use Moo::Role; with 'SharedRole'; } { package Role2; use Moo::Role; with 'SharedRole'; } { package DoubleRole; use Moo::Role; with qw(Role1 Role2); } { package Base; use Moo; with 'DoubleRole'; } use Base; Base->new; =begin [/tmp/moo] $ perl fired fired :%s/Moo/Moose/g [/tmp/moo] $ perl fired =cut BUILD modifier fires twice in Moo, once in Moose. Have only tested in 2.00002. example is a reduction of current Message::Passing::AMQP hierarchy. thanks
Download (untitled) / with headers
text/plain 138b
This isn't something specific to BUILD, but all role application. I've moved this to Role::Tiny as that is where the behavior comes from.
Download (untitled) / with headers
text/plain 115b
Fixed in Role::Tiny 2.000002. There will be a new Moo release out shortly that will depend on Role::Tiny 2.000002.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to