Debora/Package/Mageia.pm

filter: Statementstmt 71.4% 20 / 28 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 1 / 1 totaltotal 70.0% 28 / 40 CC 3 SCAR 8.2
CC
3
Cov
66%
format_priority
4.5
_normalize_version
2.0
BEGIN
1.0
CRAP 2.3
« Debora/Pod.pm ↑ Summary
1 package CPANPLUS::Dist::Debora::Package::Mageia;
2  
3 # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later
4  
5 3 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 our $VERSION = '0.019';
10  
11 3 ▶use parent qw(CPANPLUS::Dist::Debora::Package::RPM);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶use CPANPLUS::Dist::Debora::Util qw(parse_version);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶sub format_priority {
Subroutine format_priority: called CC=3 SCAR=15.0
Pod documented
16 2 my $class = shift;
17  
18 2 my $priority = 0;
19 2 ▶ if (-f '/etc/mageia-release') {
Branch: 1 branch
BranchTrueFalseTotal
if (-f "/etc/mageia-release") 0 2 2
20 0 $priority = $class->SUPER::format_priority;
21 0 ▶ if ($priority > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($priority > 0) 0 0 0
22 0 $priority = 3;
23 }
24 }
25  
26 2 return $priority;
27 }
28  
29 ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
30  
31 0 ▶sub _normalize_version {
Subroutine _normalize_version: not called CC=1 SCAR=6.9
32 0 my ($self, $dist_version) = @_;
33  
34 0 my $version = $self->SUPER::_normalize_version($dist_version);
35 0 $version = parse_version($version)->normal;
36 0 $version =~ s{\A v}{}xms;
37  
38 0 return $version;
39 }
40  
41 3 1;
42 __END__
« Debora/Pod.pm ↑ Summary