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
|
|
14750
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
5
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
89
|
|
6
|
2
|
|
|
2
|
|
1003
|
use CGI::Compile; |
|
2
|
|
|
|
|
37624
|
|
|
2
|
|
|
|
|
50
|
|
7
|
2
|
|
|
2
|
|
737
|
use CGI::Emulate::PSGI; |
|
2
|
|
|
|
|
54547
|
|
|
2
|
|
|
|
|
58
|
|
8
|
2
|
|
|
2
|
|
859
|
use Plack::Builder; |
|
2
|
|
|
|
|
13160
|
|
|
2
|
|
|
|
|
108
|
|
9
|
2
|
|
|
2
|
|
1060
|
use Plack::App::MCCS; |
|
2
|
|
|
|
|
39627
|
|
|
2
|
|
|
|
|
50
|
|
10
|
2
|
|
|
2
|
|
10
|
use Exporter(); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
30
|
|
11
|
2
|
|
|
2
|
|
744
|
use File::Share ':all'; |
|
2
|
|
|
|
|
10453
|
|
|
2
|
|
|
|
|
244
|
|
12
|
2
|
|
|
2
|
|
9
|
use File::Spec; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
269
|
|
13
|
|
|
|
|
|
|
our %form; #data from the previous page |
14
|
|
|
|
|
|
|
our $error = ""; #error flag |
15
|
|
|
|
|
|
|
our $VERSION ="3.01"; #version of this software |
16
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
17
|
|
|
|
|
|
|
our @EXPORT = qw(%form $error $VERSION); |
18
|
|
|
|
|
|
|
############################################################################### |
19
|
|
|
|
|
|
|
sub new{ |
20
|
1
|
|
|
1
|
0
|
393
|
my $script = dist_file('Plack-App-WebMySQL', 'cgi-bin/webmysql/webmysql.cgi'); |
21
|
1
|
|
|
|
|
131
|
my $sub = CGI::Compile->compile($script); |
22
|
0
|
|
|
|
|
|
my $app = CGI::Emulate::PSGI->handler($sub); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $staticDir = dist_dir('Plack-App-WebMySQL'); |
25
|
0
|
|
|
|
|
|
$staticDir = File::Spec->catdir($staticDir, 'htdocs', 'webmysql'); |
26
|
0
|
|
|
|
|
|
my $staticApp = Plack::App::MCCS->new(root => $staticDir)->to_app; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $builder = Plack::Builder->new(); |
29
|
0
|
|
|
|
|
|
$builder->mount("/webmysql" => $staticApp); |
30
|
0
|
|
|
|
|
|
$builder->mount("/" => $app); |
31
|
0
|
|
|
|
|
|
return $builder; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
############################################################################### |
34
|
|
|
|
|
|
|
return 1; |