File Coverage

blib/lib/App/VW.pm
Criterion Covered Total %
statement 24 32 75.0
branch 0 2 0.0
condition n/a
subroutine 8 12 66.6
pod 0 3 0.0
total 32 49 65.3


line stmt bran cond sub pod time code
1             package App::VW;
2              
3 2     2   25648 use strict;
  2         3  
  2         45  
4 2     2   5 use warnings;
  2         1  
  2         40  
5 2     2   5 use base 'App::CLI';
  2         4  
  2         826  
6 2     2   21254 use Config;
  2         2  
  2         75  
7 2     2   716 use YAML 'LoadFile';
  2         8876  
  2         373  
8              
9             our $VERSION = '0.02';
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 144 my ($class) = @_;
20 1         2 $config->{apps} = $class->apps;
21 1         2 $config;
22             }
23              
24             sub apps {
25 1     1 0 2 my ($class) = @_;
26 1         79 my @apps = map { LoadFile($_) } sort glob("$config->{etc}/*.yml");
  0         0  
27 1         4 \@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   10 use base 'App::CLI::Command';
  2         2  
  2         804  
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__