line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
########################################################################### |
3
|
|
|
|
|
|
|
# Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved. |
4
|
|
|
|
|
|
|
# Please visit http://formbuilder.org for tutorials, support, and examples. |
5
|
|
|
|
|
|
|
########################################################################### |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package CGI::FormBuilder::Test; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
CGI::FormBuilder::Test - Test harness for FormBuilder |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use CGI::FormBuilder::Test; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $test = 1; |
18
|
|
|
|
|
|
|
for (@tests) { |
19
|
|
|
|
|
|
|
my $outfile = outfile($test++); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
9
|
|
|
9
|
|
7463
|
use strict; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
361
|
|
26
|
9
|
|
|
9
|
|
50
|
use warnings; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
325
|
|
27
|
9
|
|
|
9
|
|
47
|
no warnings 'uninitialized'; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
382
|
|
28
|
|
|
|
|
|
|
|
29
|
9
|
|
|
9
|
|
51
|
use CGI::FormBuilder::Util; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
1688
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our $VERSION = '3.09'; |
33
|
|
|
|
|
|
|
our $DEBUG = 0; |
34
|
|
|
|
|
|
|
|
35
|
9
|
|
|
9
|
|
53
|
use Exporter; |
|
9
|
|
|
|
|
97
|
|
|
9
|
|
|
|
|
544
|
|
36
|
9
|
|
|
9
|
|
49
|
use base 'Exporter'; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
1066
|
|
37
|
|
|
|
|
|
|
our @EXPORT = qw(outfile); |
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
9
|
|
50
|
use File::Basename 'fileparse'; |
|
9
|
|
|
|
|
14
|
|
|
9
|
|
|
|
|
918
|
|
40
|
9
|
|
|
9
|
|
10631
|
use File::Spec::Functions; |
|
9
|
|
|
|
|
10180
|
|
|
9
|
|
|
|
|
2613
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub outfile ($) { |
43
|
84
|
|
|
84
|
0
|
3695
|
my($file, $dir) = fileparse($0); |
44
|
84
|
|
|
|
|
539
|
$file =~ s/-.*//; # just save "1a-", "3d-", etc |
45
|
84
|
|
|
|
|
1162
|
my $out = catfile($dir, sprintf("$file-test%2.2d.html", $_[0])); |
46
|
84
|
50
|
|
|
|
7920
|
open(O, $out) || warn "Can't open $out: $!\n"; |
47
|
84
|
|
|
|
|
4860
|
return join '', ; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 REVISION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
$Id: Test.pm 100 2007-03-02 18:13:13Z nwiger $ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright (c) L. All Rights Reserved. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This module is free software; you may copy this under the terms of |
63
|
|
|
|
|
|
|
the GNU General Public License, or the Artistic License, copies of |
64
|
|
|
|
|
|
|
which should have accompanied your Perl kit. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |