Re: [ANNOUNCE] Test::Sims

2009-06-30 Thread David E. Wheeler
On Jun 30, 2009, at 12:13 AM, Ovid wrote: And that would potentially have issues when it assigns "\t" to $name and -12 to $age, even those are both valid values for the types in question. It would be very difficult to find data which automatically fits any random type, but it could be writ

Re: [ANNOUNCE] Test::Sims

2009-06-30 Thread Michael G Schwern
Ovid wrote: > use Test::Sims::Moose 'random'; > > Person->new( > name => random('Person.name'), > age => random('Person.age') > ); > > And that would potentially have issues when it assigns "\t" to $name and -12 > to $age > , even those are both valid values for t

Re: [ANNOUNCE] Test::Sims

2009-06-30 Thread Ovid
- Original Message > From: Michael G Schwern > > Ovid wrote: > > First feature request: automatic Moose support to build random data which > > conforms to Moose constraints :) (Yes, I know it's much, much harder than > it sounds). > > Hello, what? package Person; use Moose; h

Re: [ANNOUNCE] Test::Sims

2009-06-29 Thread Michael G Schwern
Ovid wrote: > First feature request: automatic Moose support to build random data which > conforms to Moose constraints :) (Yes, I know it's much, much harder than it sounds). Hello, what? -- Just call me 'Moron Sugar'. http://www.somethingpositive.net/sp05182002.shtml

Re: [ANNOUNCE] Test::Sims

2009-06-29 Thread Ovid
- Original Message > From: Michael G Schwern > > Sim functions can combine together to make more complicated sims. > > package Sim::Person; > > use Test::Sims; > > sub sim_person { > my %defaults = ( > name => rand_name(), > age =>

[ANNOUNCE] Test::Sims

2009-06-29 Thread Michael G Schwern
Folks might remember my talk at, I think it was YAPC 2008, "Generating Test Data With The Sims". http://schwern.org/talks/Generating%20Test%20Data%20With%20The%20Sims.pdf It was about building up little functions to generate random, but valid, data and then using those to make random, but valid, o