line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
21
|
|
|
21
|
|
11889
|
use strict; |
|
21
|
|
|
|
|
54
|
|
|
21
|
|
|
|
|
1050
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Deflator; |
4
|
|
|
|
|
|
|
$HTML::FormFu::Deflator::VERSION = '2.07'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Deflator Base Class |
6
|
|
|
|
|
|
|
|
7
|
21
|
|
|
21
|
|
127
|
use Moose; |
|
21
|
|
|
|
|
54
|
|
|
21
|
|
|
|
|
284
|
|
8
|
21
|
|
|
21
|
|
138176
|
use MooseX::Attribute::Chained; |
|
21
|
|
|
|
|
51
|
|
|
21
|
|
|
|
|
863
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'HTML::FormFu::Role::Populate'; |
11
|
|
|
|
|
|
|
|
12
|
21
|
|
|
21
|
|
132
|
use HTML::FormFu::Attribute qw( mk_inherited_accessors ); |
|
21
|
|
|
|
|
52
|
|
|
21
|
|
|
|
|
1498
|
|
13
|
21
|
|
|
21
|
|
154
|
use HTML::FormFu::ObjectUtil qw( form name parent ); |
|
21
|
|
|
|
|
47
|
|
|
21
|
|
|
|
|
5665
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has type => ( is => 'rw', traits => ['Chained'] ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->mk_inherited_accessors(qw( locale )); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub BUILD { } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub process { |
22
|
33
|
|
|
33
|
1
|
132
|
my ( $self, $values ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
33
|
50
|
|
|
|
150
|
if ( ref $values eq 'ARRAY' ) { |
25
|
0
|
|
|
|
|
0
|
return [ map { $self->deflator($_) } @$values ]; |
|
0
|
|
|
|
|
0
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
else { |
28
|
33
|
|
|
|
|
213
|
return $self->deflator($values); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub clone { |
33
|
2
|
|
|
2
|
0
|
7
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
16
|
my %new = %$self; |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
69
|
return bless \%new, ref $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding UTF-8 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
HTML::FormFu::Deflator - Deflator Base Class |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
version 2.07 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SYNOPSIS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $deflator = $form->deflator( $type, @names ); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Deflator Base Class. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 names |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Arguments: @names |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Return Value: @names |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Contains names of params to deflator. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 process |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Arguments: $form_result, \%params |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 CORE DEFLATORS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item L<HTML::FormFu::Deflator::CompoundDateTime> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item L<HTML::FormFu::Deflator::CompoundSplit> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item L<HTML::FormFu::Deflator::FormatNumber> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item L<HTML::FormFu::Deflator::PathClassFile> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item L<HTML::FormFu::Deflator::Strftime> |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 AUTHOR |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 LICENSE |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
103
|
|
|
|
|
|
|
the same terms as Perl itself. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
114
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |