.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::CheckManifest 3pm" .TH Test::CheckManifest 3pm 2024-02-21 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Test::CheckManifest \- Check if your Manifest matches your distro .SH VERSION .IX Header "VERSION" version 1.43 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Test::CheckManifest; \& ok_manifest(); .Ve .SS EXPORT .IX Subsection "EXPORT" There is only one method exported: \f(CW\*(C`ok_manifest\*(C'\fR .SH METHODS .IX Header "METHODS" .ie n .SS "ok_manifest [{exclude => $arref}][$msg]" .el .SS "ok_manifest [{exclude => \f(CW$arref\fP}][$msg]" .IX Subsection "ok_manifest [{exclude => $arref}][$msg]" checks whether the Manifest file matches the distro or not. To match a distro the Manifest has to name all files that come along with the distribution. .PP To check the Manifest file, this module searches for a file named \f(CW\*(C`MANIFEST\*(C'\fR. .PP To exclude some directories from this test, you can specify these dirs in the hashref. .PP .Vb 1 \& ok_manifest({exclude => [\*(Aq/var/test/\*(Aq]}); .Ve .PP is ok if the files in \f(CW\*(C`/path/to/your/dist/var/test/\*(C'\fR are not named in the \&\f(CW\*(C`MANIFEST\*(C'\fR file. That means that the paths in the exclude array must be "pseudo-absolute" (absolute to your distribution). .PP To use a "filter" you can use the key "filter" .PP .Vb 1 \& ok_manifest({filter => [qr/\e.svn/]}); .Ve .PP With that you can exclude all files with an '.svn' in the filename or in the path from the test. .PP These files would be excluded (as examples): .IP \(bu 4 /dist/var/.svn/test .IP \(bu 4 /dist/lib/test.svn .PP You can also combine "filter" and "exclude" with 'and' or 'or' default is 'or': .PP .Vb 3 \& ok_manifest({exclude => [\*(Aq/var/test\*(Aq], \& filter => [qr/\e.svn/], \& bool => \*(Aqand\*(Aq}); .Ve .PP These files have to be named in the \f(CW\*(C`MANIFEST\*(C'\fR: .IP \(bu 4 /var/foo/.svn/any.file .IP \(bu 4 /dist/t/file.svn .IP \(bu 4 /var/test/test.txt .PP These files not: .IP \(bu 4 /var/test/.svn/* .IP \(bu 4 /var/test/file.svn .PP By default, \f(CW\*(C`ok_manifest\*(C'\fR will look for the file \f(CW\*(C`MANIFEST\*(C'\fR in the current working directory (which is how tests are traditionally run). If you wish to specify a different directory, you may pass the \f(CW\*(C`file\*(C'\fR or \f(CW\*(C`dir\*(C'\fR parameters, for example: .PP .Vb 1 \& ok_manifest({dir => \*(Aq/path/to/my/dist/\*(Aq}); .Ve .SH "EXCLUDING FILES" .IX Header "EXCLUDING FILES" Beside \f(CW\*(C`filter\*(C'\fR and \f(CW\*(C`exclude\*(C'\fR there is another way to exclude files: \&\f(CW\*(C`MANIFEST.SKIP\*(C'\fR. This is a file with filenames that should be excluded: .PP .Vb 2 \& t/my_very_own.t \& file_to.skip .Ve .SH "REPLACE THIS MODULE" .IX Header "REPLACE THIS MODULE" You can replace the test scripts using \f(CW\*(C`Test::CheckManifest\*(C'\fR with this one using ExtUtils::Manifest. .PP .Vb 2 \& use Test::More tests => 2; \& use ExtUtils::Manifest; \& \& is_deeply [ ExtUtils::Manifest::manicheck() ], [], \*(Aqmissing\*(Aq; \& is_deeply [ ExtUtils::Manifest::filecheck() ], [], \*(Aqextra\*(Aq; .Ve .PP (thanks to \f(CW@mohawk2\fR ). .SH ACKNOWLEDGEMENT .IX Header "ACKNOWLEDGEMENT" Great thanks to Christopher H. Laco, who did a lot of testing stuff for me and he reported some bugs to RT. .SH AUTHOR .IX Header "AUTHOR" Renee Baecker .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2018 by Renee Baecker. .PP This is free software, licensed under: .PP .Vb 1 \& The Artistic License 2.0 (GPL Compatible) .Ve