line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Role::FormAndBlockMethods; |
2
|
|
|
|
|
|
|
|
3
|
400
|
|
|
400
|
|
156923
|
use strict; |
|
400
|
|
|
|
|
586
|
|
|
400
|
|
|
|
|
14672
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
400
|
|
|
400
|
|
1455
|
use Moose::Role; |
|
400
|
|
|
|
|
496
|
|
|
400
|
|
|
|
|
2069
|
|
7
|
|
|
|
|
|
|
|
8
|
400
|
|
|
400
|
|
1303577
|
use HTML::FormFu::Util qw( _merge_hashes ); |
|
400
|
|
|
|
|
611
|
|
|
400
|
|
|
|
|
20113
|
|
9
|
400
|
|
|
400
|
|
1685
|
use Carp qw( croak ); |
|
400
|
|
|
|
|
526
|
|
|
400
|
|
|
|
|
16123
|
|
10
|
400
|
|
|
400
|
|
1577
|
use List::Util 1.33 qw( none ); |
|
400
|
|
|
|
|
8735
|
|
|
400
|
|
|
|
|
68273
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub default_args { |
13
|
2029
|
|
|
2029
|
0
|
2861
|
my ( $self, $defaults ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2029
|
|
100
|
|
|
7337
|
$self->{default_args} ||= {}; |
16
|
|
|
|
|
|
|
|
17
|
2029
|
100
|
|
|
|
4203
|
if ($defaults) { |
18
|
|
|
|
|
|
|
|
19
|
104
|
|
|
|
|
314
|
my @valid_types = qw( |
20
|
|
|
|
|
|
|
elements deflators |
21
|
|
|
|
|
|
|
filters constraints |
22
|
|
|
|
|
|
|
inflators validators |
23
|
|
|
|
|
|
|
transformers output_processors |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
104
|
|
|
|
|
242
|
for my $type ( keys %$defaults ) { |
27
|
|
|
|
|
|
|
croak "not a valid type for default_args: '$type'" |
28
|
124
|
50
|
|
422
|
|
531
|
if none { $type eq $_ } @valid_types; |
|
422
|
|
|
|
|
642
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$self->{default_args} |
32
|
104
|
|
|
|
|
377
|
= _merge_hashes( $self->{default_args}, $defaults ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
2029
|
|
|
|
|
5239
|
return $self->{default_args}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |