Patch/Command/SendPatch.pm

filter: Statementstmt 70.9% 22 / 31 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 66.6% 28 / 42 CC 4 SCAR 20.0
CC
4
Cov
63%
__ANON__
16.8
BEGIN
1.3
BEGIN
1.0
CRAP 7.4
« Patch/Command/Import.pm ↑ Summary Patch/Release.pm »
1 package Git::CPAN::Patch::Command::SendPatch;
2 1 our $AUTHORITY = 'cpan:YANICK';
3 #ABSTRACT: create patch files and submit them to RT
4 1 $Git::CPAN::Patch::Command::SendPatch::VERSION = '2.3.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 Method::Signatures::Simple;
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 with 'Git::CPAN::Patch::Role::Git';
15 1 with 'Git::CPAN::Patch::Role::Patch';
16  
17 1 ▶method run {
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: not called CC=4 SCAR=28.2
18 0 $self->format_patch;
19  
20 0 ▶ if ( $self->nbr_patches > 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->nbr_patches > 1) 0 0 0
21 0 say "Refusing to send more than one patch (each patch email will be in its own RT ticket).";
22 0 say "Run git-cpan-send-email manually to override, or squash your commits.";
23  
24 0 ▶ say and unlink($_) for $self->all_patches;
Branch: 1 branch
BranchTrueFalseTotal
say $_ and unlink $_ 0 0 0
25  
26 0 return;
27 }
28  
29 0 $self->send_emails( $self->all_patches );
30 1 }
31  
32 1 __PACKAGE__->meta->make_immutable;
33  
34 1 1;
35  
36 __END__
37  
38 =pod
39  
40 =encoding UTF-8
41  
42 =head1 NAME
43  
44 Git::CPAN::Patch::Command::SendPatch - create patch files and submit them to RT
45  
46 =head1 VERSION
47  
48 version 2.3.2
49  
50 =head1 SYNOPSIS
51  
52 % git-cpan send-patch
53  
54 =head1 DESCRIPTION
55  
56 This command runs C<git-cpan format-patch> and then if there is one patch file
57 runs C<git-cpan send-email>.
58  
59 Multiple patches are not sent because C<git send-email> creates a separate
60 message for each patch file, resulting in multiple tickets.
61  
62 =head1 AUTHOR
63  
64 Yanick Champoux <yanick@cpan.org>
65  
66 =head1 COPYRIGHT AND LICENSE
67  
68 This software is copyright (c) 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009 by Yanick Champoux.
69  
70 This is free software; you can redistribute it and/or modify it under
71 the same terms as the Perl 5 programming language system itself.
72  
73 =cut
« Patch/Command/Import.pm ↑ Summary Patch/Release.pm »