File Coverage

lib/Plack/App/WebMySQL.pm
Criterion Covered Total %
statement 22 28 78.5
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 30 37 81.0


line stmt bran cond sub pod time code
1             #the dumb terminal webmysql module
2             #mt 16/11/2003 2.4 moved version into this module
3             package Plack::App::WebMySQL;
4 2     2   14333 use strict;
  2         2  
  2         42  
5 2     2   6 use warnings;
  2         2  
  2         40  
6 2     2   745 use CGI::Compile;
  2         35845  
  2         48  
7 2     2   708 use CGI::Emulate::PSGI;
  2         50007  
  2         47  
8 2     2   838 use Plack::Builder;
  2         12503  
  2         108  
9 2     2   940 use Plack::App::MCCS;
  2         38976  
  2         48  
10 2     2   10 use Exporter();
  2         2  
  2         217  
11             our %form; #data from the previous page
12             our $error = ""; #error flag
13             our $VERSION ="3.0"; #version of this software
14             our @ISA = qw(Exporter);
15             our @EXPORT = qw(%form $error $VERSION);
16             ###############################################################################
17             sub new{
18 1     1 0 122 my $sub = CGI::Compile->compile("./cgi-bin/webmysql/webmysql.cgi");
19 0           my $app = CGI::Emulate::PSGI->handler($sub);
20              
21 0           my $staticApp = Plack::App::MCCS->new(root => "./htdocs/webmysql")->to_app;
22            
23 0           my $builder = Plack::Builder->new();
24 0           $builder->mount("/webmysql" => $staticApp);
25 0           $builder->mount("/" => $app);
26 0           return $builder;
27             }
28             ###############################################################################
29             return 1;