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