Re: Roles driven by events

2009-03-16 Thread Jon Lang
Ovid wrote: Requiring methods and requiring methods to be called are different things.   It might be a nice feature to have roles which tie into events.  If a particular condition doesn't hold true by, say, INIT time, the role fails. How would I implement something like that in Perl 6?  Or

Re: Roles driven by events

2009-03-16 Thread Jonathan Worthington
Ovid wrote: Having a problem with the following role in Perl 5: package PIPs::ResultSource::Role::HasTags; use Moose::Role; requires 'do_setup'; after 'do_setup' = sub { ... }; So far this has worked really well, aside from that one class which didn't call 'do_setup'. Oops.