blib/lib/Shipwright/Script/Maintain.pm

filter: Statementstmt 54.8% 17 / 31 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 42.3% 22 / 52 CC 6 SCAR 30.7
CC
6
Cov
41%
run
42.0
options
2.0
BEGIN
1.0
CRAP 21.6
« blib/lib/Shipwright/Source/Compressed.pm ↑ Summary blib/lib/Shipwright/Test.pm »
1 package Shipwright::Script::Maintain;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Shipwright::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use base qw/App::CLI::Command Shipwright::Base Shipwright::Script/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 __PACKAGE__->mk_accessors(
9 qw/update_order update_refs graph_deps skip_recommends
10 skip_build_requires skip_requires skip_test_requires for_dists/
11 );
12  
13 1 ▶use Shipwright;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 0 ▶sub options {
Subroutine options: not called CC=1 SCAR=6.9
Pod undocumented
16 (
17 0 'graph-deps' => 'graph_deps',
18 'update-order' => 'update_order',
19 'update-refs' => 'update_refs',
20 'skip-recommends' => 'skip_recommends',
21 'skip-requires' => 'skip_requires',
22 'skip-build-requires' => 'skip_build_requires',
23 'skip-test-requires' => 'skip_test_requires',
24 'for-dists=s' => 'for_dists',
25 );
26 }
27  
28 0 ▶sub run {
Subroutine run: not called CC=6 SCAR=37.4
Pod undocumented
29 0 my $self = shift;
30  
31 0 my $shipwright = Shipwright->new( repository => $self->repository, );
32  
33 0 ▶ if ( $self->update_order ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->update_order) 0 0 0
34 $shipwright->backend->update_order(
35 for_dists => [ split /,\s*/, $self->for_dists || '' ],
36 0 ▶ map { $_ => $self->$_ }
Condition0%0/2
$self->for_dists || ''
l!l
00
MC/DC0%0/1
$self->for_dists || ''
$self->for_dists
Truth table0%0/2
A
A= $self->for_dists
Aresult
11
00
37 qw/skip_requires skip_recommends skip_build_requires
38 skip_test_requires/,
39 );
40 0 $self->log->fatal( 'successfully updated order' );
41 }
42 0 ▶ if ($self->graph_deps) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->graph_deps) 0 0 0
43 my $out = $shipwright->backend->graph_deps(
44 for_dists => [ split /,\s*/, $self->for_dists || '' ],
45 0 ▶ map { $_ => $self->$_ }
Condition0%0/2
$self->for_dists || ''
l!l
00
MC/DC0%0/1
$self->for_dists || ''
$self->for_dists
Truth table0%0/2
A
A= $self->for_dists
Aresult
11
00
46 qw/skip_requires skip_recommends skip_build_requires/,
47 );
48 0 $self->log->fatal( $out );
49 }
50  
51 0 ▶ if ( $self->update_refs ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->update_refs) 0 0 0
52 0 $shipwright->backend->update_refs;
53 0 $self->log->fatal( 'successfully updated refs' );
54 }
55 }
56  
57 1 1;
58  
59 __END__
« blib/lib/Shipwright/Source/Compressed.pm ↑ Summary blib/lib/Shipwright/Test.pm »