line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Field::Boolean; |
2
|
|
|
|
|
|
|
# ABSTRACT: a true or false field |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Field::Boolean::VERSION = '0.40067'; |
4
|
7
|
|
|
7
|
|
5800
|
use Moose; |
|
7
|
|
|
|
|
313635
|
|
|
7
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
extends 'HTML::FormHandler::Field::Checkbox'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub value { |
9
|
101
|
|
|
101
|
1
|
105
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
101
|
|
|
|
|
261
|
my $v = $self->next::method(@_); |
12
|
|
|
|
|
|
|
|
13
|
101
|
100
|
|
|
|
1414
|
return $v ? 1 : 0; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
17
|
7
|
|
|
7
|
|
33422
|
use namespace::autoclean; |
|
7
|
|
|
|
|
6012
|
|
|
7
|
|
|
|
|
75
|
|
18
|
|
|
|
|
|
|
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.40067 |
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) 2016 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 |