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