line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TinyAuth::Install; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
38212
|
use 5.005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
44
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
6
|
use base 'Module::CGI::Install'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1270
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
229968
|
use vars qw{$VERSION}; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
64
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
1
|
|
|
1
|
|
304
|
$VERSION = '0.98'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub prepare { |
13
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Add the files to install |
16
|
0
|
|
|
|
|
|
$self->add_script('TinyAuth', 'tinyauth'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Hand off to the parent class |
19
|
0
|
|
|
|
|
|
return $self->SUPER::prepare(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub run { |
23
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Install the script/lib files |
26
|
0
|
|
|
|
|
|
my $rv = $self->SUPER::run; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Create the default config file |
29
|
0
|
|
|
|
|
|
my $to = $self->cgi_map->catfile('tinyauth.conf')->path; |
30
|
0
|
0
|
|
|
|
|
open( CONFIG, ">$to" ) or die "Failed to open tinyauth.conf"; |
31
|
0
|
0
|
|
|
|
|
print CONFIG "---\n" or die "Failed to write tinyauth.conf"; |
32
|
0
|
0
|
|
|
|
|
close CONFIG or die "Failed to close tinyauth.conf"; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $rv; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |