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.40068'; |
4
|
7
|
|
|
7
|
|
6814
|
use Moose; |
|
7
|
|
|
|
|
637051
|
|
|
7
|
|
|
|
|
61
|
|
5
|
|
|
|
|
|
|
extends 'HTML::FormHandler::Field::Checkbox'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub value { |
9
|
101
|
|
|
101
|
1
|
219
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
101
|
|
|
|
|
369
|
my $v = $self->next::method(@_); |
12
|
|
|
|
|
|
|
|
13
|
101
|
100
|
|
|
|
1642
|
return $v ? 1 : 0; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
17
|
7
|
|
|
7
|
|
46464
|
use namespace::autoclean; |
|
7
|
|
|
|
|
8363
|
|
|
7
|
|
|
|
|
69
|
|
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.40068 |
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 |