line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Rose::HTMLx::Form::Field::Boolean; |
2
|
1
|
|
|
1
|
|
34764
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
273
|
|
4
|
1
|
|
|
1
|
|
695
|
use Rose::HTMLx::Form::Field::RadioButtonBoolean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
5
|
1
|
|
|
1
|
|
38
|
use base qw( Rose::HTML::Form::Field::RadioButtonGroup ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1190
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Rose::HTMLx::Form::Field::Boolean - extend RHTMLO RadioButtonGroup |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=cut |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# see Rose::HTML::Form::Field::RadioButtonGroup |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
This Field class is for boolean-type fields. The default labels are True |
22
|
|
|
|
|
|
|
and False, paired with values 1 and 0 respectively. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHODS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Only new or overridden methods are documented here. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
|
|
sub _item_class {'Rose::HTMLx::Form::Field::RadioButtonBoolean'} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 init |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Sets up the object. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub init { |
39
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
40
|
0
|
|
|
|
|
|
$self->SUPER::init(@_); # MUST do this first |
41
|
0
|
|
|
|
|
|
$self->xhtml_linebreak(''); |
42
|
0
|
|
|
|
|
|
$self->radio_buttons( [ '1', '0' ] ); |
43
|
0
|
|
|
|
|
|
$self->labels( { 1 => 'True', 0 => 'False' } ); |
44
|
0
|
|
|
|
|
|
return $self; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 xhtml_field |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Returns the radio button pair within a |
50
|
|
|
|
|
|
|
tagset. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub xhtml_field { |
55
|
0
|
|
|
0
|
1
|
|
my ($self) = shift; |
56
|
0
|
0
|
|
|
|
|
my $sep = ( $self->linebreak ) ? $self->xhtml_linebreak : ' '; |
57
|
0
|
|
|
|
|
|
return ' ' |
58
|
0
|
|
|
|
|
|
. join( $sep, map { $_->xhtml_field } $self->items ) |
59
|
|
|
|
|
|
|
. ''; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Peter Karman, C<< >> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 BUGS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
69
|
|
|
|
|
|
|
C, or through the web interface at |
70
|
|
|
|
|
|
|
L. |
71
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
72
|
|
|
|
|
|
|
your bug as I make changes. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SUPPORT |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
perldoc Rose::HTMLx::Form::Field::Boolean |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
You can also look for information at: |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over 4 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * CPAN Ratings |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * Search CPAN |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The Minnesota Supercomputing Institute C<< http://www.msi.umn.edu/ >> |
105
|
|
|
|
|
|
|
sponsored the development of this software. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Copyright 2007 by the Regents of the University of Minnesota. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
112
|
|
|
|
|
|
|
under the same terms as Perl itself. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=cut |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
1; |