line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Processor; |
2
|
|
|
|
|
|
|
|
3
|
401
|
|
|
401
|
|
205546
|
use strict; |
|
401
|
|
|
|
|
525
|
|
|
401
|
|
|
|
|
15053
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
401
|
|
|
401
|
|
1508
|
use Moose; |
|
401
|
|
|
|
|
489
|
|
|
401
|
|
|
|
|
2224
|
|
7
|
401
|
|
|
401
|
|
1706938
|
use MooseX::Attribute::FormFuChained; |
|
401
|
|
|
|
|
559
|
|
|
401
|
|
|
|
|
14307
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'HTML::FormFu::Role::NestedHashUtils', |
10
|
|
|
|
|
|
|
'HTML::FormFu::Role::HasParent', |
11
|
|
|
|
|
|
|
'HTML::FormFu::Role::Populate'; |
12
|
|
|
|
|
|
|
|
13
|
401
|
|
|
|
|
20639
|
use HTML::FormFu::Attribute qw( |
14
|
|
|
|
|
|
|
mk_output_accessors |
15
|
|
|
|
|
|
|
mk_inherited_accessors |
16
|
401
|
|
|
401
|
|
1500
|
); |
|
401
|
|
|
|
|
457
|
|
17
|
401
|
|
|
|
|
89650
|
use HTML::FormFu::ObjectUtil qw( |
18
|
|
|
|
|
|
|
form |
19
|
|
|
|
|
|
|
name nested_name |
20
|
401
|
|
|
401
|
|
1589
|
nested_names parent ); |
|
401
|
|
|
|
|
504
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has type => ( is => 'rw', traits => ['FormFuChained'] ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__PACKAGE__->mk_output_accessors(qw( message )); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->mk_inherited_accessors(qw( locale )); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
*field = \&parent; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub localize_args { |
31
|
38
|
|
|
38
|
0
|
62
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
38
|
50
|
|
|
|
122
|
if (@_) { |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# user's passing their own args - save them |
36
|
0
|
0
|
|
|
|
0
|
if ( @_ == 1 ) { |
37
|
0
|
|
|
|
|
0
|
$self->{localize_args} = $_[0]; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
0
|
|
|
|
|
0
|
$self->{localize_args} = [@_]; |
41
|
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
0
|
return $self; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# if the user passed a value, use that - even if it's undef |
46
|
38
|
50
|
|
|
|
134
|
if ( exists $self->{localize_args} ) { |
47
|
0
|
|
|
|
|
0
|
return $self->{localize_args}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# do we have a method to build our own args? |
51
|
38
|
100
|
|
|
|
280
|
if ( my $method = $self->can('_localize_args') ) { |
52
|
6
|
|
|
|
|
28
|
return $self->$method; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
32
|
|
|
|
|
183
|
return; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub clone { |
59
|
53
|
|
|
53
|
0
|
64
|
my ($self) = @_; |
60
|
|
|
|
|
|
|
|
61
|
53
|
|
|
|
|
191
|
my %new = %$self; |
62
|
|
|
|
|
|
|
|
63
|
53
|
|
|
|
|
146
|
return bless \%new, ref $self; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 NAME |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
HTML::FormFu::Processor - base class for constraints |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 VERSION |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
version 2.05 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |