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