houseabsolute / Params-ValidationCompiler

Build an optimized subroutine parameter validator once, use it forever
https://metacpan.org/release/Params-ValidationCompiler/
Other
4 stars 5 forks source link

"default" should imply "optional" for positional argument validation #6

Closed oschwald closed 8 years ago

oschwald commented 8 years ago

Currently, it doesn't seem to:

my $validator = validation_for(
    params => [
        1,
        { default => 1 },
    ],
);

$validator->(0);

results in got 1 parameter but expected at least 2.