| 1 | 21 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | |||||||||||
| 3 | package HTML::FormFu::Deflator; | ||||||||||
| 4 | 21 | $HTML::FormFu::Deflator::VERSION = '2.06'; | |||||||||
| 5 | # ABSTRACT: Deflator Base Class | ||||||||||
| 6 | |||||||||||
| 7 | 21 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 21 | ▶ | use MooseX::Attribute::Chained; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 21 | with 'HTML::FormFu::Role::Populate'; | |||||||||
| 11 | |||||||||||
| 12 | 21 | ▶ | use HTML::FormFu::Attribute qw( mk_inherited_accessors ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 21 | ▶ | use HTML::FormFu::ObjectUtil qw( form name parent ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 21 | has type => ( is => 'rw', traits => ['Chained'] ); | |||||||||
| 16 | |||||||||||
| 17 | 21 | __PACKAGE__->mk_inherited_accessors(qw( locale )); | |||||||||
| 18 | |||||||||||
| 19 | ▶ | sub BUILD { } | |||||||||
|
Subroutine
BUILD: called CC=1 SCAR=0.0
| |||||||||||
| 20 | |||||||||||
| 21 | sub process { | ||||||||||
| 22 | 33 | ▶ | my ( $self, $values ) = @_; | ||||||||
|
Subroutine
process: called CC=2 SCAR=8.4
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | 33 | ▶ | if ( ref $values eq 'ARRAY' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 0 | return [ map { $self->deflator($_) } @$values ]; | |||||||||
| 26 | } | ||||||||||
| 27 | else { | ||||||||||
| 28 | 33 | return $self->deflator($values); | |||||||||
| 29 | } | ||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | sub clone { | ||||||||||
| 33 | 2 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
clone: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 34 | |||||||||||
| 35 | 2 | my %new = %$self; | |||||||||
| 36 | |||||||||||
| 37 | 2 | return bless \%new, ref $self; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 21 | __PACKAGE__->meta->make_immutable; | |||||||||
| 41 | |||||||||||
| 42 | 21 | 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.06 | ||||||||||
| 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 | ||||||||||