blib/lib/CGI/example.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl -w
2  
3 # CGI script that simply displays the XML
4  
5 use strict;
6 use CGI::XMLForm;
7  
8 my $cgi = new CGI::XMLForm;
9  
10 print $cgi->header;
11  
12 # Output HTML Body
13 if ($cgi->param) {
14 print $cgi->start_html('CGI::XMLForm'),
15 $cgi->h1("Form gave us the following params:"),
16 $cgi->hr;
17 print $cgi->pre($cgi->escapeHTML(join "\n", split '&', $cgi->query_string));
18
19 my $xml = $cgi->ToXML();
20  
21 print $cgi->hr;
22  
23 print $cgi->pre($cgi->escapeHTML($xml)), $cgi->br, $cgi->hr;
24  
25 }
26 else {
27 print $cgi->start_html('error'),
28 $cgi->h1("Error: "),
29 $cgi->h2("FATAL ERROR : Expecting parameters - please execute from correct source");
30 }