You will need to manually disambiguate the validate conflicts, which
can be done with aliasing like so:
package Foo;
use Moose;
with 'ValidateThis' => { alias => { validate =>
'validate_this' }},
'ValidateThat' => { alias => { validate =>
'validate_that' }},
'ValidateSomethingElse' => { alias => { validate =>
'validate_something_else' }};
sub validate {
my $self = shift;
$self->validate_this;
$self->validate_that;
$self->validate_something_else;
}
You can read more about this feature at
http://search.cpan.org/~drolsky/Moose-0.74/lib/Moose/Cookbook/Roles/Recipe2.pod
- Stevan
On Apr 14, 2009, at 5:39 AM, Zbigniew Lukasiak wrote:
Hi,
I guess this might be a very basic question - but I could not find
anything suitable in the docs - so I want a way to add multiple
'validate' methods to a form Field and have them called in what ever
sequence. Is there a nice way to do that in Moose?
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/