Skip Menu |

This queue is for tickets about the Data-Random CPAN distribution.

Report information
The Basics
Id: 119855
Status: open
Priority: 0/
Queue: Data-Random

People
Owner: BAREFOOT [...] cpan.org
Requestors: NEILB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.03
Fixed in: (no value)



Subject: make rand_enum() more DWIM?
More than once I've written: my $value = rand_enum([qw/ a b c d e f /]); Forgetting the set => How about making rand_enum() more DWIM'ish? If there's a single argument and it's an arrayref, then take that as the set. Cheers, Neil
Sorry that this issue got lost in the shuffle! Show quoted text
> More than once I've written: > > my $value = rand_enum([qw/ a b c d e f /]); > > Forgetting the > > set => > > How about making rand_enum() more DWIM'ish? If there's a single > argument and it's an arrayref, > then take that as the set.
I am not opposedd to this at all. In fact, you'd be hard-pressed to come up with a suggestion to make things more DWIMmy that I wouldn't agree with. ;-> If you have a patch with a test, I'd be happy to merge it in.