| 1 | package HTML::FormHandler::Field::Boolean; | ||||||||||
| 2 | # ABSTRACT: a true or false field | ||||||||||
| 3 | 7 | $HTML::FormHandler::Field::Boolean::VERSION = '0.410000'; | |||||||||
| 4 | 7 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | extends 'HTML::FormHandler::Field::Checkbox'; | |||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | sub value { | ||||||||||
| 9 | 101 | ▶ | my $self = shift; | ||||||||
|
Subroutine
value: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 10 | |||||||||||
| 11 | 101 | my $v = $self->next::method(@_); | |||||||||
| 12 | |||||||||||
| 13 | 101 | ▶ | return $v ? 1 : 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 7 | __PACKAGE__->meta->make_immutable; | |||||||||
| 17 | 7 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 7 | 1; | |||||||||
| 19 | |||||||||||
| 20 | __END__ | ||||||||||
| 21 | |||||||||||
| 22 | =pod | ||||||||||
| 23 | |||||||||||
| 24 | =encoding UTF-8 | ||||||||||
| 25 | |||||||||||
| 26 | =head1 NAME | ||||||||||
| 27 | |||||||||||
| 28 | HTML::FormHandler::Field::Boolean - a true or false field | ||||||||||
| 29 | |||||||||||
| 30 | =head1 VERSION | ||||||||||
| 31 | |||||||||||
| 32 | version 0.410000 | ||||||||||
| 33 | |||||||||||
| 34 | =head1 DESCRIPTION | ||||||||||
| 35 | |||||||||||
| 36 | This field returns 1 if true, 0 if false. The widget type is 'Checkbox'. | ||||||||||
| 37 | Similar to Checkbox, except only returns values of 1 or 0. | ||||||||||
| 38 | |||||||||||
| 39 | =head1 AUTHOR | ||||||||||
| 40 | |||||||||||
| 41 | FormHandler Contributors - see HTML::FormHandler | ||||||||||
| 42 | |||||||||||
| 43 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 44 | |||||||||||
| 45 | This software is copyright (c) 2017 by Gerda Shank. | ||||||||||
| 46 | |||||||||||
| 47 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 48 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 49 | |||||||||||
| 50 | =cut | ||||||||||