develooper Front page | perl.moose | Postings from October 2011

Re: Design Pattern for Validation

Thread Previous
From:
Cory Watson
Date:
October 11, 2011 07:44
Subject:
Re: Design Pattern for Validation
Message ID:
4E945643.3090700@gmail.com
Peter Gordon wrote:
> I am trying to find a decent design pattern for Moose validation of
> user input. All the Moose examples I have found either assume that
> the data is correct or else dies.

<snip>

You might be interested in using:

https://metacpan.org/module/Data::Verifier

Which lets you filter, verify and report failures using the same Moose 
types you are using in your classes.

Bonus: Data::Manager may also be useful to you.


-- 
Cory G Watson
http://www.onemogin.com


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About