| 1 | 4 | ▶ | use v5.12; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package Benchmark::Featureset::ParamCheck::Implementation::PVC::Moose; | ||
| 6 | |||
| 7 | 4 | our $AUTHORITY = 'cpan:TOBYINK'; | |
| 8 | 4 | our $VERSION = '0.006'; | |
| 9 | |||
| 10 | 4 | ▶ | use parent qw(Benchmark::Featureset::ParamCheck::Base::PVC); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 4 | ▶ | use Params::ValidationCompiler 0.24 qw(validation_for); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 4 | ▶ | use Moose::Util::TypeConstraints 2.2002; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 4 | my $t = \&Moose::Util::TypeConstraints::find_or_parse_type_constraint; | |
| 16 | |||
| 17 | 4 | ▶ | use constant long_name => 'Params::ValidationCompiler with Moose'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 4 | ▶ | use constant short_name => 'PVC-Moose'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | sub get_named_check { | ||
| 21 | 78 | ▶ | state $check = validation_for( |
|
Subroutine
get_named_check: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 22 | params => { | ||
| 23 | integer => { type => $t->('Int') }, | ||
| 24 | hashes => { type => $t->('ArrayRef[HashRef]') }, | ||
| 25 | object => { type => duck_type(Printable => [qw/ print close /]) }, | ||
| 26 | }, | ||
| 27 | ); | ||
| 28 | } | ||
| 29 | |||
| 30 | sub get_positional_check { | ||
| 31 | 87 | ▶ | state $check = validation_for( |
|
Subroutine
get_positional_check: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 32 | params => [ | ||
| 33 | { type => $t->('Int') }, | ||
| 34 | { type => $t->('ArrayRef[HashRef]') }, | ||
| 35 | { type => duck_type(Printable => [qw/ print close /]) }, | ||
| 36 | ], | ||
| 37 | ); | ||
| 38 | } | ||
| 39 | |||
| 40 | 4 | 1; | |