Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: RFC: Proofread POD for my main random module, please? (more)

by hippo (Bishop)
on Jun 01, 2017 at 22:04 UTC ( [id://1191901]=note: print w/replies, xml ) Need Help??


in reply to RFC: Proofread POD for my main random module, please? (more)

In your synopsis you have this line:

my $random_thing = random($hash_of_arrays, $list, $options);

but in reading the source it appears that the second argument is expected to be a scalar, not a list. That's confusing.

Also you say several times, "When XXX is selected" but give no clue as to what "selected" means in this context. Again, it is only by reading the source that we can see you mean "passed as a literal value as the second argument to random()".

I think it would help a great deal if in your snippet listing the example random_color() sub you were actually to specify values for the three variables instead of leaving us all to wonder what they might be (or even what form they should take). eg.

my $key = 'foo'; my $additions = 'elephant'; my $color_hash = { a => [qw/ I do not know /], b => [qw/ what should + go here /] }; my $rv = random_color ($key, $additions); sub random_color { my ($color_key, $color_additions) = @_; random($color_hash, $color_key, { caller => 'random_color', additi +ons => $color_additions}); }

Finally, I don't see why instant_rand() is so named. Why not list_item_rand()?

HTH.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1191901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2024-04-18 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found