On Tue, Apr 14, 2009 at 1:14 PM, Stevan Little
wrote:
> 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'
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' }},
'Va
2009/4/14 Zbigniew Lukasiak :
> package Role::A;
> use Moose::Role;
> after 'validate' => sub {
> print "Role::A\n";
> }
It's ok, but as far as I remember, with "after" modifier you're return
value is totally ignored.
Nice explanation you'll find at
http://search.cpan.org/perldo
On Tue, Apr 14, 2009 at 2:15 PM, Chris Prather wrote:
> Roles by default will drop conflicting methods on the floor. However you can
> optionally remap method names and or exclude method names.
>
> If you were to remap thr validate methods then in you main class write a
> single validate that call
Roles by default will drop conflicting methods on the floor. However you can
optionally remap method names and or exclude method names.
If you were to remap thr validate methods then in you main class write a
single validate that called them that would be the cleanest solution.
On Apr 14, 2009 8:
2009/4/14 Zbigniew Lukasiak :
> Ah - sorry I was not specific enough. What I had in mind was more
> something similar to
>
> with ValidationRoleSomething;
> with ValidationRoleSomethingElse;
> with ValidationRoleEntirelyDifferent;
>
> and all those Roles providing a 'validate' method without a con
On Tue, Apr 14, 2009 at 1:21 PM, Piotr Roszatycki
wrote:
> 2009/4/14 Zbigniew Lukasiak :
>> 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
2009/4/14 Zbigniew Lukasiak :
> 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?
I guess
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.bl