| 1 | package App::VW; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use base 'App::CLI'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use Config; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | ▶ | use YAML 'LoadFile'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 2 | our $VERSION = '0.02'; | |||||||||
| 10 | |||||||||||
| 11 | our $config = { | ||||||||||
| 12 | etc => '/etc/vw', | ||||||||||
| 13 | perl => $Config{perlpath}, | ||||||||||
| 14 | 2 | init => '/etc/init.d/vw', | |||||||||
| 15 | pid_file => '/var/run/vw.pid', | ||||||||||
| 16 | }; | ||||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | sub config { | ||||||||
|
Subroutine
config: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 19 | 1 | my ($class) = @_; | |||||||||
| 20 | 1 | $config->{apps} = $class->apps; | |||||||||
| 21 | 1 | $config; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | sub apps { | ||||||||
|
Subroutine
apps: called CC=1 SCAR=0.2
Pod
undocumented
| |||||||||||
| 25 | 1 | my ($class) = @_; | |||||||||
| 26 | 0 | my @apps = map { LoadFile($_) } sort glob("$config->{etc}/*.yml"); | |||||||||
| 27 | 1 | \@apps; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub error_cmd { | ||||||||
|
Subroutine
error_cmd: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 31 | 0 | my ($self) = @_; | |||||||||
| 32 | 0 | "That command does not exist.\n"; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | package App::VW::Command; | ||||||||||
| 36 | 2 | ▶ | use base 'App::CLI::Command'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 37 | |||||||||||
| 38 | 0 | ▶ | sub options { | ||||||||
|
Subroutine
options: not called CC=1 SCAR=6.9
| |||||||||||
| 39 | ( | ||||||||||
| 40 | 0 | 'verbose|v' => 'verbose', | |||||||||
| 41 | 'help|h' => 'help' | ||||||||||
| 42 | ) | ||||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | sub run { | ||||||||
|
Subroutine
run: not called CC=1 SCAR=6.9
| |||||||||||
| 46 | 0 | my ($self) = @_; | |||||||||
| 47 | 0 | print "Not Implmenented, Yet.\n"; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | sub verbose { | ||||||||
|
Subroutine
verbose: not called CC=2 SCAR=17.9
| |||||||||||
| 51 | 0 | my ($self, @message) = @_; | |||||||||
| 52 | 0 | ▶ | print @message, "\n" if ($self->{verbose}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 2 | 1; | |||||||||
| 56 | |||||||||||
| 57 | __END__ | ||||||||||