line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
2
|
1
|
|
|
1
|
|
802
|
use Test; |
|
1
|
|
|
|
|
3446
|
|
|
1
|
|
|
|
|
143
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
2
|
BEGIN { plan tests => 12 } |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
2369
|
use HTML::FormWizard; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
10142
|
|
7
|
1
|
|
|
|
|
7
|
ok(1); |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
|
|
636
|
my $form=HTML::FormWizard->new( |
10
|
|
|
|
|
|
|
-title => 'Camelot Forms Wizard'); |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
5
|
ok($form->{title},'Camelot Forms Wizard'); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
356
|
$form->set(-url => 'http://www.camelot.co.pt/'); |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
5
|
ok('http://www.camelot.co.pt/',$form->{url}); |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
348
|
$form->add({ name => 'teste' }); |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
2
|
ok(1,scalar @{$form->{fields}}); |
|
1
|
|
|
|
|
5
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
425
|
my $x=q/ |
23
|
|
|
|
|
|
|
package Form::TestCGI; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
|
|
|
|
|
|
my $y={}; |
27
|
|
|
|
|
|
|
$y->{call}=(); |
28
|
|
|
|
|
|
|
bless $y; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub header { |
32
|
|
|
|
|
|
|
my $self=shift; |
33
|
|
|
|
|
|
|
unshift @{$self->{call}}, "header"; |
34
|
|
|
|
|
|
|
return "-"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub form_header { |
38
|
|
|
|
|
|
|
my $self=shift; |
39
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_header"; |
40
|
|
|
|
|
|
|
return "-"; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub form_field { |
44
|
|
|
|
|
|
|
my $self=shift; |
45
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_field"; |
46
|
|
|
|
|
|
|
return "-"; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub form_group_init { |
50
|
|
|
|
|
|
|
my $self=shift; |
51
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_group_init"; |
52
|
|
|
|
|
|
|
return "-"; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub form_group_end { |
56
|
|
|
|
|
|
|
my $self=shift; |
57
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_group_end"; |
58
|
|
|
|
|
|
|
return "-"; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub form_actions { |
62
|
|
|
|
|
|
|
my $self=shift; |
63
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_actions"; |
64
|
|
|
|
|
|
|
return "-"; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub form_footer { |
68
|
|
|
|
|
|
|
my $self=shift; |
69
|
|
|
|
|
|
|
unshift @{$self->{call}}, "form_footer"; |
70
|
|
|
|
|
|
|
return "-"; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub footer { |
74
|
|
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
|
3
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
91
|
|
|
|
|
|
|
|
92
|
1
|
50
|
|
|
|
4
|
if ($@) { |
93
|
0
|
|
|
|
|
0
|
print $@; |
94
|
0
|
|
|
|
|
0
|
ok(0); |
95
|
|
|
|
|
|
|
} else { |
96
|
1
|
|
|
|
|
4
|
ok(1); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
1
|
|
|
|
|
328
|
$form->set(-template => $tmpl); |
100
|
|
|
|
|
|
|
|
101
|
1
|
|
|
|
|
5
|
$form->write; |
102
|
1
|
|
|
|
|
279
|
print "\n"; |
103
|
|
|
|
|
|
|
|
104
|
1
|
|
|
|
|
4
|
ok(1); |
105
|
|
|
|
|
|
|
|
106
|
1
|
|
|
|
|
169
|
print join ", ",@{$tmpl->{call}}; |
|
1
|
|
|
|
|
23
|
|
107
|
1
|
|
|
|
|
9
|
print "\n"; |
108
|
|
|
|
|
|
|
|
109
|
1
|
|
|
|
|
3
|
my $zbr = shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
6
|
|
110
|
1
|
|
|
|
|
9
|
ok("footer",$zbr); |
111
|
1
|
|
|
|
|
97
|
$zbr=shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
5
|
|
112
|
1
|
|
|
|
|
5
|
ok("form_footer",$zbr); |
113
|
1
|
|
|
|
|
65
|
$zbr=shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
5
|
|
114
|
1
|
|
|
|
|
7
|
ok(form_actions=>$zbr); |
115
|
1
|
|
|
|
|
146
|
$zbr=shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
5
|
|
116
|
1
|
|
|
|
|
6
|
ok(form_field=>$zbr); |
117
|
1
|
|
|
|
|
67
|
$zbr=shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
6
|
|
118
|
1
|
|
|
|
|
7
|
ok(form_header=>$zbr); |
119
|
1
|
|
|
|
|
65
|
$zbr=shift @{$tmpl->{call}}; |
|
1
|
|
|
|
|
4
|
|
120
|
1
|
|
|
|
|
6
|
ok(header=>$zbr); |