« blib/lib/App/Prove/Plugin/Elasticsearch.pm
↑ Summary
blib/lib/App/Prove/Elasticsearch/Blamer/System.pm »
| 1 | package App::ape; | ||||||||||
| 2 | 4 | $App::ape::VERSION = '0.001'; | |||||||||
| 3 | |||||||||||
| 4 | # PODNAME: App::ape | ||||||||||
| 5 | # ABSTRACT: Implements the `ape` binary | ||||||||||
| 6 | |||||||||||
| 7 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 4 | ▶ | use Pod::Usage; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 4 | ▶ | use App::ape::test; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 4 | ▶ | use App::ape::plan; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 4 | ▶ | use App::ape::update; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 2 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 17 | 2 | my (undef, @args) = @_; | |||||||||
| 18 | 2 | my $command = shift @args; | |||||||||
| 19 | |||||||||||
| 20 | #I am being sneaky here and using bin/ape's POD | ||||||||||
| 21 | 2 | ▶ | return pod2usage(0) unless grep { $_ eq $command } qw{plan test update}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | 2 | my $program = "App::ape::$command"; | |||||||||
| 24 | 2 | my $program_perlized = "$program.pm"; | |||||||||
| 25 | 2 | $program_perlized =~ s/::/\//g; | |||||||||
| 26 | 2 | $0 = $INC{$program_perlized}; | |||||||||
| 27 | |||||||||||
| 28 | 2 | return $program->new(@args); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 4 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||