Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 116914
Status: rejected
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: kfm [...] plushkava.net
Cc:
AdminCc:

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



Subject: Allow use of repetition operator as syntactic sugar
Hi. I think that it would be nice to be able to use the repetition operator to express the number of mandatory positional arguments. For instance: validate_pos(@_, 1 x 5, 0) In PP, the unfolding could work something like this: @arg_spec = map { ! ref && m/\A1+\z/ ? split // : $_ } @_
You can already do this by using the repetition operator, if you give the repetition operator a list: validate_pos( @_, (1) x 5, 0 );