Yes, role BUILD submethods are magically composed into the class's
BUILD method somehow (or at least called at the appropriate time).
: my IRC::Bot $bot .= new;
: # Up to now, no BUILDs of any role is called.
: $bot does IRC::Bot::SayHelloOnJoin;
: # Is IRC::Bot::SayHelloOnJoin's BUILD called now?
Seems like a reasonable thing in general. If you're going to be
adding state to an object, it really ought to be initialized correctly
(though in this case you seem to be adding the state outside the
object itself, which is also fine).
Could this be a feature of all submethods, not just BUILD? (DESTROY,
for instance, would need it too...)
Brent 'Dax' Royal-Gordon <br...@brentdax.com>
Perl and Parrot hacker