| 1 | package AnyPAN::PackageInfo; | ||||||||||||||||||||||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use version; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Class::Accessor::Lite ro => [qw/source module path/], new => 1; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||
| 9 | 2 | my $ZERO_VERSION = version->declare('0.000_000'); | |||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||
| 11 | 8 | ▶ | sub version :method { shift->{version} } ## XXX: avoid name conflict | ||||||||||||||||||||||||||||||||
|
Subroutine
version: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||
| 13 | 2 | ▶ | sub compareble_version { | ||||||||||||||||||||||||||||||||
|
Subroutine
compareble_version: called CC=4 SCAR=15.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 14 | 2 | my $self = shift; | |||||||||||||||||||||||||||||||||
| 15 | 2 | ▶ | return $ZERO_VERSION if $self->version eq 'undef'; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||
| 17 | 2 | my $compareble_version = eval { ::version->parse($self->version) }; | |||||||||||||||||||||||||||||||||
| 18 | 2 | ▶ | return $self->{compareble_version} //= $compareble_version // $ZERO_VERSION; | ||||||||||||||||||||||||||||||||
|
Condition33%2/6
$self->{"compareble_version"} //= $compareble_version // $ZERO_VERSION
$compareble_version // $ZERO_VERSION
MC/DC0%0/3
$self->{"compareble_version"} //= $compareble_version // $ZERO_VERSION
$self->{"compareble_version"}
$compareble_version
$ZERO_VERSION
Truth table0%0/4
A //= B // C
A= $self->{"compareble_version"}B= $compareble_versionC= $ZERO_VERSION
| |||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||
| 21 | 12 | ▶ | sub canonicalized_path { | ||||||||||||||||||||||||||||||||
|
Subroutine
canonicalized_path: called CC=3 SCAR=12.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 22 | 12 | my $self = shift; | |||||||||||||||||||||||||||||||||
| 23 | 12 | ▶ | return $self->{canonicalized_path} if exists $self->{canonicalized_path}; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||
| 25 | 3 | my $path = $self->path; | |||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||
| 27 | # XXX: fix backpan's path | ||||||||||||||||||||||||||||||||||
| 28 | 3 | ▶ | if ($path !~ m![A-Z0-9]/[A-Z0-9]{2}/!) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 29 | 0 | my $p2 = substr $path, 0, 2; | |||||||||||||||||||||||||||||||||
| 30 | 0 | my $p1 = substr $p2, 0, 1; | |||||||||||||||||||||||||||||||||
| 31 | 0 | $path = "$p1/$p2/$path"; | |||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||
| 34 | 3 | return $self->{canonicalized_path} = $path; | |||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||
| 37 | 2 | 1; | |||||||||||||||||||||||||||||||||
| 38 | __END__ | ||||||||||||||||||||||||||||||||||