Yes - I often need user, pass and dsn strings for a DBI connection or a DBI::db object. What would be the best pattern to deal with such cases if one were to generalise it?
On 27/11/2009, at 06:05 AM, Stevan Little wrote: > Nope, BUILD is where you want to do this. > > Would make a nice MooseX:: though :) > > - Stevan > > On Nov 26, 2009, at 11:46 AM, Ovid wrote: > >> I have two attributes, 'xml' and 'xml_file' for an object. One or the other >> must be supplied, but not both. >> >> Must I validated this in BUILD or is there another way of doing this? >> >> Cheers, >> Ovid >> -- >> Buy the book - http://www.oreilly.com/catalog/perlhks/ >> Tech blog - http://use.perl.org/~Ovid/journal/ >> Twitter - http://twitter.com/OvidPerl >> Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 >> >