-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On 02-Aug-02 Janek Schleicher carved into stone:
> Tels wrote at Sat, 03 Aug 2002 00:25:54 +0200:
> That reads really good,
> especially when written as
> Test::ManyParams seed => undef;
>:-)

:-)

>> seed or randomized are both good, I like the shorter one ;) You can take
>> your pick. 
> 
> Yep. I'll implement both (as synonyms).
> 'seed' is short and 'randomized' describes what it's talking about.
> 
>> A nice idea is to make the choosen seed available via
>> 
>>         print "$Test::ManyParams::seed\n";
> 
> ACK.
> 
> But now, when I read the idea, I have to think to the possible scenario,
> that a test scripts uses another test script and both are using
> Test::ManyParams with an own seeding could destroy a bit the concept.
> 
> So, the seed and used random numbers should depend on the callers 
> filename and package. Could be that $Test::ManyParams::seed becomes
> a tied variable, as I wouldn't like to write a method 'seed' :-).
> 

Hm, okay, a variable might be not good enough, an accessor would probably
much better. (so scrapt the variable, since that will tempt people to write:

        $Test::ManyParams::seed = 8;

Actually, I faced the same problem in BigInt, so I tied the variable. But
unlike T::MP I just couldn't leave the variable. So I would suggest you
remove the variable and have a method called seed()

        Test::ManyParams->seed(8);

I don't know what to do about two modules using Test::ManyParams at the
same time. I would suggest you follow the KISS principle and leave it for
future, until somebody needs this (I can't imagine a usefull purpose for
this - but heh, thats just me). This way your code will be more simple. ;)

>> although strictly that should not be necc, since surely T::MP will print
>> it
>> for the testsuite? (Also, I don't know how to find out the seed for the
>> case
>> 1, so probaböy case 1 and 2 should do the same and just do a
>> seed = srand(rand()).
>> 
>> (I did not quite understand your srand(0) or srand(42) example...what is
>> that supposed to accomplish?)
> 
> I first thought - now I've changed,
> that the default behaviour should be a fixed seed.
> As it wouldn't play any important role what fixed seed is taken,
> I imagined the canonical 0 or even the sense of life :-)

Ah I see. I had a doubt that you wanted to do so and tried (well,
sucessfully ;) to stop that :-)

I can see some uses for T::MP.

Best wishes,

Tels

- -- 
 perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"'
 carefully repurpose dot-com developments

 http://bloodgate.com/perl       My current Perl projects
 PGP key available on http://bloodgate.com/tels.asc or via email

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBPUuzX3cLPEOTuEwVAQF23Qf+LqLQA7O94knKi625z44oxAiGEpkNTeEr
Wb7qSuNee58YScm7F5qRRBeKJSPCNpUsoXei+vc4pFJRrQHTC3MHwrpLUDO1Hb0S
qQ+Xcs+21ZRkF4oRaYZYy2+yfdO+ESl75gZT6xLi9CfyEV0GHtoArXRo6TYMBUV7
zQJ8Z6fY52MQzmWLDgiCKxe5DXQoAOx/JMkRj404h1MJyMAVXi93JgoMUj+i4Vs5
cMZZybmo3q6DGHp9QUK/R8jrYAwv3lRxlq9FViUPz7tl1QIHaWwpciDB6/NkwN5n
CZ+IVtw/uOacMGlovpl5RZ4rfsgZ+Vz7N57qGUeFcf4mxkIgoUSbOg==
=Wq+W
-----END PGP SIGNATURE-----

Reply via email to