Patch/Command/Update.pm

filter: Statementstmt 83.3% 25 / 30 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod n/a totaltotal 73.8% 31 / 42 CC 3 SCAR 11.0
CC
3
Cov
74%
__ANON__
6.0
__ANON__
6.0
BEGIN
1.0
CRAP 3.0
« Patch/Role/Git.pm ↑ Summary Patch.pm »
1 package Git::CPAN::Patch::Command::Update;
2 1 our $AUTHORITY = 'cpan:YANICK';
3 #ABSTRACT: Import the latest version of a module and rebase the current branch
4 1 $Git::CPAN::Patch::Command::Update::VERSION = '2.5.2';
5 1 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Git::Repository;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use MooseX::App::Command;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 extends 'Git::CPAN::Patch::Command::Import';
15  
16 1 ▶use experimental qw/
Subroutine BEGIN: called CC=1 SCAR=0.0
17 signatures
18 postderef
19 1 /;
20  
21 #TODO check for versions before download
22  
23 1 has last_import_before_run => (
24 is => 'rw',
25 );
26  
27 0 ▶before run => sub ($self) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
28 0 ▶ eval { $self->set_last_import_before_run($self->last_commit) }
Branch: 1 branch
BranchTrueFalseTotal
eval { do { $self->set_last_import_before_run($self->last_commit) } } or die "branch 'cpan/master' doesn't exist yet (import first)\n" 0 0 0
29 or die "branch 'cpan/master' doesn't exist yet (import first)\n";
30 0 $self->set_thing_to_import( $self->tracked_distribution );
31 1 };
32  
33 0 ▶after run => sub ($self) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
34 0 ▶ return if $self->last_import_before_run eq $self->last_commit;
Branch: 1 branch
BranchTrueFalseTotal
if $self->last_import_before_run eq $self->last_commit 0 0 0
35  
36 0 $self->git_run( rebase => 'cpan/master' );
37 1 };
38  
39 1 __PACKAGE__->meta->make_immutable;
40  
41 1 1;
42  
43 __END__
« Patch/Role/Git.pm ↑ Summary Patch.pm »