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
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
- 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
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
- 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 =>
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