| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::FormWidgets::Rule; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2005
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
63
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
44
|
|
|
5
|
1
|
|
|
1
|
|
8
|
use parent 'HTML::FormWidgets'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( qw( alt config href imgclass ) ); |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init { |
|
10
|
1
|
|
|
1
|
1
|
3
|
my ($self, $args) = @_; |
|
11
|
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
4
|
$self->alt ( undef ); |
|
13
|
1
|
|
|
|
|
8
|
$self->config ( {} ); |
|
14
|
1
|
|
|
|
|
10
|
$self->container( 0 ); |
|
15
|
1
|
|
|
|
|
7
|
$self->href ( undef ); |
|
16
|
1
|
|
|
|
|
6
|
$self->imgclass ( undef ); |
|
17
|
1
|
|
|
|
|
5
|
return; |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub render_field { |
|
21
|
1
|
|
|
1
|
1
|
3
|
my ($self, $args) = @_; my ($cells, $html); my $hacc = $self->hacc; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
4
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
50
|
|
|
|
7
|
if ($self->imgclass) { |
|
24
|
0
|
|
|
|
|
0
|
$html = $hacc->hr ( { class => $self->class } ); |
|
25
|
0
|
|
|
|
|
0
|
$cells = $hacc->td ( { class => q(minimal rule_section) }, $html ); |
|
26
|
0
|
0
|
|
|
|
0
|
$html = $self->text |
|
27
|
|
|
|
|
|
|
? $hacc->img ( { alt => $self->alt, |
|
28
|
|
|
|
|
|
|
class => $self->imgclass, |
|
29
|
|
|
|
|
|
|
src => $self->text } ) |
|
30
|
|
|
|
|
|
|
: $hacc->span( { class => $self->imgclass } ); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
1
|
|
|
|
|
12
|
else { $html = $self->text } |
|
33
|
|
|
|
|
|
|
|
|
34
|
1
|
50
|
|
|
|
101
|
$self->href and $html = $self->inflate( { class => q(togglers), |
|
35
|
|
|
|
|
|
|
config => $self->config, |
|
36
|
|
|
|
|
|
|
container => 0, |
|
37
|
|
|
|
|
|
|
href => $self->href, |
|
38
|
|
|
|
|
|
|
id => $self->id, |
|
39
|
|
|
|
|
|
|
text => $html, |
|
40
|
|
|
|
|
|
|
type => q(anchor) } ); |
|
41
|
|
|
|
|
|
|
|
|
42
|
1
|
50
|
33
|
|
|
12
|
if ($html and $self->tip) { |
|
43
|
0
|
|
|
|
|
0
|
$html = $hacc->span( { class => q(tips), title => $self->tip }, $html ); |
|
44
|
0
|
|
|
|
|
0
|
$self->tip( undef ); |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
1
|
50
|
|
|
|
4
|
$html and $cells .= $hacc->td( { class => q(minimal) }, $html ); |
|
48
|
1
|
|
|
|
|
5
|
$cells .= $hacc->td( { class => q(most rule_section) }, |
|
49
|
|
|
|
|
|
|
$hacc->hr( { class => $self->class } ) ); |
|
50
|
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
118
|
return $hacc->table( { class => q(rule) }, $hacc->tr( $cells ) ); |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|