| 1 | package CPAN::Audit::Discover; | ||||||||||||||
| 2 | 13 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 13 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 13 | ▶ | use CPAN::Audit::Discover::Cpanfile; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 13 | ▶ | use CPAN::Audit::Discover::CpanfileSnapshot; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | |||||||||||||||
| 7 | 13 | our $VERSION = "1.001"; | |||||||||||||
| 8 | |||||||||||||||
| 9 | 8 | ▶ | sub new { | ||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||
| 10 | 8 | my $class = shift; | |||||||||||||
| 11 | |||||||||||||||
| 12 | 8 | my $self = {}; | |||||||||||||
| 13 | 8 | bless $self, $class; | |||||||||||||
| 14 | |||||||||||||||
| 15 | 8 | return $self; | |||||||||||||
| 16 | } | ||||||||||||||
| 17 | |||||||||||||||
| 18 | 3 | ▶ | sub discover { | ||||||||||||
|
Subroutine
discover: called CC=3 SCAR=12.7
Pod
undocumented
| |||||||||||||||
| 19 | 3 | my $self = shift; | |||||||||||||
| 20 | 3 | my ($path) = @_; | |||||||||||||
| 21 | |||||||||||||||
| 22 | 3 | ▶ | if ( -f "$path/cpanfile.snapshot" ) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 23 | 0 | return CPAN::Audit::Discover::CpanfileSnapshot->new->discover("$path/cpanfile.snapshot"); | |||||||||||||
| 24 | } | ||||||||||||||
| 25 | elsif ( -f "$path/cpanfile" ) { | ||||||||||||||
| 26 | 3 | return CPAN::Audit::Discover::Cpanfile->new->discover("$path/cpanfile"); | |||||||||||||
| 27 | } | ||||||||||||||
| 28 | else { | ||||||||||||||
| 29 | } | ||||||||||||||
| 30 | |||||||||||||||
| 31 | 0 | return; | |||||||||||||
| 32 | } | ||||||||||||||
| 33 | |||||||||||||||
| 34 | 13 | 1; | |||||||||||||