line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::VW; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
74175
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
77
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
148
|
|
5
|
2
|
|
|
2
|
|
12
|
use base 'App::CLI'; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
2128
|
|
6
|
2
|
|
|
2
|
|
57374
|
use Config; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
97
|
|
7
|
2
|
|
|
2
|
|
4262
|
use YAML 'LoadFile'; |
|
2
|
|
|
|
|
24303
|
|
|
2
|
|
|
|
|
633
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $config = { |
12
|
|
|
|
|
|
|
etc => '/etc/vw', |
13
|
|
|
|
|
|
|
perl => $Config{perlpath}, |
14
|
|
|
|
|
|
|
init => '/etc/init.d/vw', |
15
|
|
|
|
|
|
|
pid_file => '/var/run/vw.pid', |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub config { |
19
|
1
|
|
|
1
|
0
|
695
|
my ($class) = @_; |
20
|
1
|
|
|
|
|
6
|
$config->{apps} = $class->apps; |
21
|
1
|
|
|
|
|
3
|
$config; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub apps { |
25
|
1
|
|
|
1
|
0
|
2
|
my ($class) = @_; |
26
|
1
|
|
|
|
|
58
|
my @apps = map { LoadFile($_) } sort glob("$config->{etc}/*.yml"); |
|
0
|
|
|
|
|
0
|
|
27
|
1
|
|
|
|
|
5
|
\@apps; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub error_cmd { |
31
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
32
|
0
|
|
|
|
|
|
"That command does not exist.\n"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package App::VW::Command; |
36
|
2
|
|
|
2
|
|
24
|
use base 'App::CLI::Command'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
2446
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub options { |
39
|
|
|
|
|
|
|
( |
40
|
0
|
|
|
0
|
|
|
'verbose|v' => 'verbose', |
41
|
|
|
|
|
|
|
'help|h' => 'help' |
42
|
|
|
|
|
|
|
) |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub run { |
46
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
47
|
0
|
|
|
|
|
|
print "Not Implmenented, Yet.\n"; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub verbose { |
51
|
0
|
|
|
0
|
|
|
my ($self, @message) = @_; |
52
|
0
|
0
|
|
|
|
|
print @message, "\n" if ($self->{verbose}); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |