| 1 | package HTML::FormHandler::Field::NoValue; | ||||||||||
| 2 | # ABSTRACT: base class for submit field | ||||||||||
| 3 | 31 | $HTML::FormHandler::Field::NoValue::VERSION = '0.410002'; | |||||||||
| 4 | 31 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 31 | extends 'HTML::FormHandler::Field'; | |||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 31 | has 'html' => ( is => 'rw', isa => 'Str', default => '' ); | |||||||||
| 9 | 31 | has 'value' => ( | |||||||||
| 10 | is => 'rw', | ||||||||||
| 11 | predicate => 'has_value', | ||||||||||
| 12 | clearer => 'clear_value', | ||||||||||
| 13 | ); | ||||||||||
| 14 | |||||||||||
| 15 | 69 | ▶ | sub _result_from_fields { | ||||||||
|
Subroutine
_result_from_fields: called CC=2 SCAR=6.9
| |||||||||||
| 16 | 69 | my ( $self, $result ) = @_; | |||||||||
| 17 | 69 | my $value = $self->get_default_value; | |||||||||
| 18 | 69 | ▶ | if ( $value ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 1 | $self->value($value); | |||||||||
| 20 | } | ||||||||||
| 21 | 69 | $self->_set_result($result); | |||||||||
| 22 | 69 | $result->_set_field_def($self); | |||||||||
| 23 | 69 | return $result; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 4 | ▶ | sub _result_from_input { | ||||||||
|
Subroutine
_result_from_input: called CC=1 SCAR=0.0
| |||||||||||
| 27 | 4 | my ( $self, $result, $input, $exists ) = @_; | |||||||||
| 28 | 4 | $self->_set_result($result); | |||||||||
| 29 | 4 | $result->_set_field_def($self); | |||||||||
| 30 | 4 | return $result; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 0 | ▶ | sub _result_from_object { | ||||||||
|
Subroutine
_result_from_object: not called CC=1 SCAR=6.9
| |||||||||||
| 34 | 0 | my ( $self, $result, $value ) = @_; | |||||||||
| 35 | 0 | $self->_set_result($result); | |||||||||
| 36 | 0 | $result->_set_field_def($self); | |||||||||
| 37 | 0 | return $result; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 7 | ▶ | sub fif { } | ||||||||
|
Subroutine
fif: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 41 | |||||||||||
| 42 | 31 | has '+widget' => ( default => '' ); | |||||||||
| 43 | 31 | has '+noupdate' => ( default => 1 ); | |||||||||
| 44 | |||||||||||
| 45 | 17 | ▶ | sub validate_field { } | ||||||||
|
Subroutine
validate_field: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 46 | |||||||||||
| 47 | #sub clear_value { } | ||||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | sub render { | ||||||||
|
Subroutine
render: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 50 | 0 | my $self = shift; | |||||||||
| 51 | 0 | return $self->html; | |||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | 31 | __PACKAGE__->meta->make_immutable; | |||||||||
| 55 | 31 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 56 | 31 | 1; | |||||||||
| 57 | |||||||||||
| 58 | __END__ | ||||||||||