Patch/Command/SendPatch.pm

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