File Coverage

blib/lib/Module/Release/MANIFEST.pm
Criterion Covered Total %
statement 11 18 61.1
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 16 26 61.5


line stmt bran cond sub pod time code
1 1     1   1199 use v5.16;
  1         4  
2              
3             package Module::Release::MANIFEST;
4              
5 1     1   5 use strict;
  1         2  
  1         29  
6 1     1   8 use warnings;
  1         29  
  1         33  
7 1     1   6 use Exporter qw(import);
  1         3  
  1         242  
8              
9             our @EXPORT = qw( check_MANIFEST );
10              
11             our $VERSION = '2.128';
12              
13             =encoding utf8
14              
15             =head1 NAME
16              
17             Module::Release::MANIFEST - Check Perl's MANIFEST to ensure you've updated it
18              
19             =head1 SYNOPSIS
20              
21             The release script automatically loads this module and checks your
22             MANIFEST file. It runs C<{make|Build} manifest> and dies if the
23             output contains any lines that start with C or C.
24              
25             If it dies, you have to start the release process again after
26             verifying F (and F).
27              
28             =head1 DESCRIPTION
29              
30             =over 4
31              
32             =item check_MANIFEST
33              
34             Runs C<{make|Build} manifest>. If it sees output
35             starting with C or C, it dies.
36              
37             It looks in C to get the name of the distribution file.
38              
39             There's a slight problem with this command. It might re-order the
40             list of files in F. Although this doesn't bother this
41             command, it might make the file dirty for source control.
42              
43             =cut
44              
45             sub check_MANIFEST
46             {
47 0     0 1   my $self = shift;
48              
49 0           $self->_print( "Checking MANIFEST... " );
50              
51 0           my $perl = $self->{perl};
52              
53 0           my @ignore = $self->_get_prereq_ignore_list;
54              
55 0           my $output = $self->run( "$self->{make} manifest 2>&1" );
56              
57 0 0         $self->_die( "\nERROR: MANIFEST is dirty! Update MANIFEST or MANIFEST.SKIP!\n$output\n\nAborting release\n" )
58             if $output =~ /^(?:added|removed)/mi;
59              
60 0           $self->_print( "done\n" );
61             }
62              
63             =back
64              
65             =head1 SEE ALSO
66              
67             L
68              
69             =head1 SOURCE AVAILABILITY
70              
71             This source is in GitHub
72              
73             https://github.com/briandfoy/module-release
74              
75             =head1 AUTHOR
76              
77             brian d foy, C<< >>
78              
79             =head1 COPYRIGHT AND LICENSE
80              
81             Copyright © 2007-2021, brian d foy C<< >>. All rights reserved.
82              
83             This program is free software; you can redistribute it and/or modify
84             it under the Artistic License 2.0.
85              
86             =cut
87              
88             1;