Re: Sharing BUILDARGS() functionality.
[email protected] (Stevan Little)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
You can apply roles like this: with 'Foo'; with 'Bar'; It is not recommended because it will bypass the method conflict checking, but it does work and is supported. - Stevan On Jan 19, 2009, at 10:09 PM, Elliot Shank wrote: > Stevan Little wrote: >> This (IMO) is the perfect use case for the horizontal reuse of >> roles because it allows you to inject commonly needed functionality >> into your classes without forcing some kind of convoluted >> inheritance relationship that does not accurately reflect your >> domain. > > But this is a case where the lack of a guarantee of role application > order is a problem: it's definitely going to matter whether this > functionality kicks in after something else. I think I need to do > something which guarantees that this stuff happens before anything > else.