Re: Design Pattern for Validation

2011-10-11 Thread Karen Etheridge
On Tue, Oct 11, 2011 at 04:30:25PM +0200, 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. ... > From an OOP perspective, it seems to me that the valid

Re: OO Design Principles/Patterns

2011-10-11 Thread Stevan Little
On Oct 11, 2011, at 11:33 AM, John Napiorkowski wrote: > - Original Message - >> From: Steve >> To: Stevan Little >> Cc: Moose ML ; John Napiorkowski >> Sent: Tuesday, October 11, 2011 11:19 AM >> Subject: Re: OO Design Principles/Patterns >> >> John and Stevan, >> >> Thank you both f

Re: OO Design Principles/Patterns

2011-10-11 Thread John Napiorkowski
- Original Message - > From: Steve > To: Stevan Little > Cc: Moose ML ; John Napiorkowski > Sent: Tuesday, October 11, 2011 11:19 AM > Subject: Re: OO Design Principles/Patterns > > John and Stevan, > > Thank you both for your comments.  This is pretty heady stuff for > someone wh

Re: OO Design Principles/Patterns

2011-10-11 Thread Steve
John and Stevan, Thank you both for your comments. This is pretty heady stuff for someone who went to college to get a business degree :) I will definitely take a look at all the resources referenced, and offer one more that I stumbled across after my initial message: http://www.bryanesmith

Re: Design Pattern for Validation

2011-10-11 Thread Stevan Little
On Oct 11, 2011, at 10:30 AM, 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. > > Example: > package Address ; > use Moose; > use Moose::Util::TypeCo

Re: Design Pattern for Validation

2011-10-11 Thread Cory Watson
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. You might be interested in using: https://metacpan.org/module/Data::Verifier Which lets you filter, ve

Design Pattern for Validation

2011-10-11 Thread Peter Gordon
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. Example: package Address ; use Moose; use Moose::Util::TypeConstraints; subtype 'Email', as 'Str', where { $_ =~ m!

Re: OO Design Principles/Patterns

2011-10-11 Thread Stevan Little
On Oct 11, 2011, at 9:02 AM, John Napiorkowski wrote: >> From: Steve >> To: "moose@perl.org" >> Sent: Tuesday, October 11, 2011 8:50 AM >> Subject: OO Design Principles/Patterns >> >> As someone who arrived somewhat late to the OO game, I have take every >> opportunity to learn some of the prin

Re: OO Design Principles/Patterns

2011-10-11 Thread John Napiorkowski
> >From: Steve >To: "moose@perl.org" >Sent: Tuesday, October 11, 2011 8:50 AM >Subject: OO Design Principles/Patterns > >As someone who arrived somewhat late to the OO game, I have take every >opportunity to learn some of the principles of OO design and use.  I ha

OO Design Principles/Patterns

2011-10-11 Thread Steve
As someone who arrived somewhat late to the OO game, I have take every opportunity to learn some of the principles of OO design and use. I have been using Moose for a couple of years, primarily in the context of Catalyst and HTML::FormHandler. Lately though, I am studying the book 'Design Pat