Last active
February 7, 2019 18:35
-
-
Save sgnix/db91b3cf38ae8486c31672d5c36a7a4f to your computer and use it in GitHub Desktop.
Oddity in Params::ValidationCompiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Types::Standard qw/Int Str/; | |
use Params::ValidationCompiler qw( validation_for ); | |
sub foo { | |
my ($num) = validation_for( | |
params => [ | |
{ type => Str } | |
] | |
)->(@_); | |
print $num; | |
} | |
foo(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment