Basic/One.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 34 CC 1 SCAR 6.9
CC
1
Cov
0%
setup
2.0
start
2.0
BEGIN
2.0
CRAP 2.0
1 package CGI::Application::Demo::Basic::One;
2  
3 # Documentation:
4 # POD-style documentation is at the end. Extract it with pod2html.*.
5 #
6 # Note:
7 # o tab = 4 spaces || die
8 #
9 # Author:
10 # Ron Savage <ron@savage.net.au>
11 # http://savage.net.au/index.html
12  
13 use base 'CGI::Application';
14 use strict;
15 use warnings;
16  
17 require 5.005_62;
18  
19 use CGI;
20  
21 our $VERSION = '1.06';
22  
23 # -----------------------------------------------
24  
25 sub setup
26 {
27 my($self) = @_;
28  
29 $self -> run_modes(start => \&start);
30  
31 } # End of setup.
32  
33 # -----------------------------------------------
34  
35 sub start
36 {
37 my($self) = @_;
38 my($package) = __PACKAGE__;
39 my($time) = scalar localtime;
40 my($url) = $self -> query -> url;
41 my($path_info) = $self -> query -> path_info;
42 my($output) =<<EOS;
43 <html>
44 <head>
45 <title>$package</title>
46 </head>
47 <body>
48 <h1 align="center">$package</h1>
49 <ul>
50 <li>Time: $time</li>
51 <li>URL: $url</li>
52 <li>Path info: $path_info</li>
53 <li>CGI V $CGI::VERSION</li>
54 </ul>
55 </body>
56 </html>
57 EOS
58  
59 return $output;
60  
61 } # End of start.
62  
63 # -----------------------------------------------
64  
65 1;