Test-Pod-1.51/000700 000766 000024 00000000000 12546042050 013336 5ustar00etherstaff000000 000000 Test-Pod-1.51/.ackrc000644 000766 000024 00000000066 12546041574 014450 0ustar00etherstaff000000 000000 --ignore-dir=Test-Pod-1.50 --ignore-dir=Test-Pod-1.51 Test-Pod-1.51/.mailmap000644 000766 000024 00000000236 12546041537 015003 0ustar00etherstaff000000 000000 # https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors ChrisWi ChrisWi Test-Pod-1.51/.travis.yml000644 000766 000024 00000000154 12524451030 015457 0ustar00etherstaff000000 000000 language: perl perl: - "5.21" - "5.20" - "5.18" - "5.16" - "5.14" - "5.12" - "5.10" - "5.8" Test-Pod-1.51/Changes000644 000766 000024 00000020154 12546041756 014661 0ustar00etherstaff000000 000000 Change log for Test::Pod 1.51 2015-07-04 20:36:53Z * convert tooling from Module::Build to ExtUtils::MakeMaker (resolves circular dependency with MB on perl 5.21+) 1.50 2015-05-28T21:42:48Z * Restored support for ignoring directories listed in `%Test::Pod::ignore_dirs`, inadvertently dropped by the switch to File::Find in v1.46. Thanks to Julien ÉLIE for the report and diagnosis! 1.49 2015-05-12T17:30:58Z * Changed license in the README to "Same as Perl" to match the license listed in `META.yml`, and in the POD as of v1.42. * Tightened up the heuristic for matching Perl batch files to require that the file end in `.bat`, as described in the documentation. Patch from Luca Ferrari. * Simplified some of the matching code. Patch from Luca Ferrari. * Transferred ownership of the repository to the perl-pod organization on GitHub. * Removed the Pod testing test from the distribution. Seems silly for a module designed for testing Pod, right? But it's considered best practice to do Pod testing in development only, not in a release. 1.48 - 2013-05-06T04:47:00Z * Fixed test failure with versions of Pod::Simple lower than 3.24. Thanks to Martin Holste and Tatsuhiko Miyagawa for the reports. 1.47 - 2013-05-05T03:14:25Z * Fixed failing test on Pod::Simple 3.27 and higher. 1.46 - 2013-02-16T19:46:17Z * Fixed a crash when `all_pod_files_ok()` finds no files to test. Thanks to H.Merijn Brand. * Switched from custom file searching code to File::Find. Suggested by H.Merijn Brand. * Fixed failing test on Pod::Simple 3.24. 1.45 - 2011-03-09T20:00:59 * Removed Module::Build from `build_requires`, since it does nothing out-of-the ordinary, and this keeps it out of the `Makefile.PL`'s `PM_PREREQ`. Per gripe from Peter Scott. 1.44 - 2010-04-26T17:33:02 * Restored the `Makefile.PL` by using Module::Build::Compat's "traditional" configuration. 1.43 - 2010-04-21T02:33:59 * Reduced prereq for Test::More to 0.62, prereq for Pod::Simple to 3.05, and added File::Spec to the list of prereqs. The prerequisites were needlessly high, and by reducing them Test::Pod can rely on the core versions of those modules in on Perl 5.8.8. Thanks to Chris Wittmer for the patch. 1.42 - 2010-03-10T19:41:20 * Fixed invalid Pod link. Thanks to Markus Sonderegger. * Changed license in the POD to "Same as Perl" to match the license listed in `META.yml`. * Changed `Build.PL` to require Module::Build 0.30. It already does in `configure_requires`, but also doing so on the `use` line helps provide a more useful error message in older toolchain tools that don't use `configure_requires`. * Updated `MANIFEST` so that the `README` is actually included in the distribution. * Now recognizes `.bat` files as Perl files when they contain "--*-Perl-*--" on the first line. Thanks to Olivier 'dolmen' Mengué for the patch (RT #46973). * `all_pod_files_ok()` now operates on directories as well as files. Thanks to Adriano Ferreira for the patch (RT #33025). * Files with no POD now have " (no pod)" added to test name. Thanks to Adriano Ferreira for the patch (RT #34955). * Updated documentation to note that `.PL` files are considered Perl files. Thanks to Adriano Ferreira for the spot (RT #34955). * `all_pod_files_ok()` now lets `pod_file_ok()` set the default test name, rather than doing so itself. Thanks to Adriano Ferreira for the spot (RT #34955). 1.41 - 2010-01-14T20:09:25 * Maintenance transfered to David Wheeler. * Test::Pod no longer complains about the construct L, as it is no longer illegal (as of Perl 5.11.3). * Switched to Module::Build. 1.40 - Sun Jul 12 23:32:11 CDT 2009 [THINGS THAT MAY BREAK YOUR CODE] Test::Pod now requires Perl 5.8.0. [ENHANCEMENTS] Test::Pod now complains about the illegal construct L. Thanks to Paul Miller. The list of directories to exclude is now much longer, and is available in %Test::Pod::ignore_dirs. This list is right now: '.bzr' => 'Bazaar', '.git' => 'Git', '.hg' => 'Mercurial', '.pc' => 'quilt', '.svn' => 'Subversion', CVS => 'CVS', RCS => 'RCS', SCCS => 'SCCS', _darcs => 'darcs', _sgbak => 'Vault/Fortress', 1.26 - Wed Jul 19 09:54:48 CDT 2006 No new functionality in this version. [FIXES] * Fixed a Win32 build bug. * Fixed a bug in the SYNOPSIS. 1.24 - Wed Feb 1 15:18:06 PST 2006 [THINGS THAT MAY BREAK YOUR CODE] * The long-deprecated pod_ok() is now gone, along with all its constants. [ENHANCEMENTS] * Now runs properly under VMS. Thanks to Peter Edwards. 1.22 - Sun Oct 23 23:45:51 CDT 2005 [ENHANCEMENTS] * Added check for lines with only whitespace before or after a directive. Older POD formatters can get confused by such lines since they goof up paragraph mode. (RT #6467) [FIXES] * Bumped up requirements to Test::Simple 0.62. 1.20 - Wed Jun 23 00:28:35 CDT 2004 [ENHANCEMENTS] * Looks in blib/ if there is one, otherwise looks in lib/ * Thanks to David Wheeler for nudging. 1.18 - Fri May 28 23:48:28 CDT 2004 [FIXES] * Now exports all_pod_files() as advertised. * Also includes *.t files as Pod. 1.16 - Fri Apr 30 17:42:50 CDT 2004 [FIXES] * Fixed a warning under 5.8.3. Also explicitly closes dir handles when searching for POD. 1.14 - Wed Apr 28 23:38:29 CDT 2004 [ENHANCEMENTS] * Now runs taint-safe. No longer uses File::Find. I'm trying to get all my modules to run under -T correctly, so this is big. 1.12 - Sat Mar 13 10:34:06 CST 2004 [ENHANCEMENTS] * all_pod_files() now picks up *.PL files. 1.10 - Tue Mar 9 23:27:16 CST 2004 [ENHANCEMENTS] * Almost all of my coverage is almost to 100%. [FIXES] * Fixed some test bugs on Win32. * Message problems if the file is missing. 1.08 - Wed Jan 21 00:40:07 CST 2004 No new features or fixes. [FIXES] * t/all_pod_files.t failed because in my zeal to be a good cross-platform guy, I used File::Spec separators on lists to compare against those coming from File::Find, which uses slashes. 1.06 - Sat Jan 10 08:47:55 CST 2004 No new features or fixes. [FIXES] * t/all_pod_files.t failed because all_pod_files() returns an unsorted list. Fixed. 1.04 - Fri Jan 9 22:39:15 CST 2004 [ENHANCEMENTS] * all_pod_files() can now take multiple start directories. Thanks to David Wheeler for the patch. 1.03 [FIXES] * All the *ok() functions now return the value of the underlying ok(). [DOCUMENTATION] * All functions are now documented. [INTERNALS] * Removed valid_file, which was not being used. 1.02 - Mon Nov 10 09:07:39 CST 2003 No new functionality. If 1.00 installed for you, then you don't need 1.02. [FIXES] * Fixed dumb test failure in t/all_pod_files.t. [DOCUMENTATION] * Spiffed up the SYNOPSIS. 1.00 - Mon Nov 10 00:06:30 CST 2003 [NEW FEATURES] * Added all_pod_files_ok() method. 0.96 - Sat Oct 11 22:46:00 CST 2003 * Removed dependency on IO::Scalar, which was wrong. * Requires newest, most-lenient Pod::Simple. * Added various tests to the t/ hierarchy. Thanks to David Wheeler for help on this. 0.95 - Mon Mar 3 09:35:00 CST 2002 * Rewrote to use Pod::Simple instead of Pod::Checker * Deprecated the pod_ok function. * Added pod_file_ok() to replace pod_ok(). 0.90 - Tue Dec 3 18:59:39 CST 2002 * things seem to be going well, so this is not in beta :) * cleanup up some formatting * fixed the bad pod test which some Pod::Checker versions reported extra errors 0.72 - Thu Nov 14 20:16:13 CST 2002 * cleaned up Makefile.PL and tests * no code changes 0.71 - Mon Sep 9 10:58:22 CDT 2002 * added Test::Builder::Tester to PREREQ_PM 0.70 - Thu Sep 5 22:39:13 CDT 2002 * pod_ok shows POD errors and warnings if it fails * you can give the test a name Test-Pod-1.51/MANIFEST000644 000766 000024 00000001172 12546042050 014502 0ustar00etherstaff000000 000000 .ackrc .mailmap .travis.yml Changes lib/Test/Pod.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP README t/00-load.t t/all_pod_files.t t/cut-outside-block.pod t/cut-outside-block.t t/empty-file.pod t/good.t t/item-ordering.pod t/item-ordering.t t/load.t t/missing-file.t t/pod/good-pod-script t/pod/good-pod-script.bat t/pod/good.pod t/pod/no_pod.pod t/selftest.t t/spaced-directives.pod t/spaced-directives.t t/unknown-directive.pod t/unknown-directive.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Test-Pod-1.51/MANIFEST.SKIP000644 000766 000024 00000002336 12546041537 015263 0ustar00etherstaff000000 000000 #!start included /Volumes/amaretto/Users/ether/.perlbrew/libs/20.2@std/lib/perl5/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this \b_eumm/ # 7.05_05 and above # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # and Module::Build::Tiny generated files \b_build_params$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ \..*\.sw.?$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid prove files \B\.prove$ # Avoid MYMETA files ^MYMETA\. #!end included /Volumes/amaretto/Users/ether/.perlbrew/libs/20.2@std/lib/perl5/ExtUtils/MANIFEST.SKIP # Avoid build files. ^Test-Pod # Avoid Pod tests. t/pod[^/.]*\.t Test-Pod-1.51/META.json000600 000766 000024 00000004042 12546042050 014761 0ustar00etherstaff000000 000000 { "abstract" : "check for POD errors in files", "author" : [ "David E. Wheeler " ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 7.0524, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Pod", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : {} }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "File::Find" : "0", "Pod::Simple" : "3.05", "Test::Builder::Tester" : "1.02", "Test::More" : "0.62", "perl" : "5.008" } }, "test" : { "requires" : { "File::Spec" : "0", "Pod::Simple" : "3.05", "Test::More" : "0.62" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://github.com/perl-pod/test-pod/issues/" }, "homepage" : "http://search.cpan.org/dist/Test-Pod/", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "https://github.com/perl-pod/test-pod.git", "web" : "https://github.com/perl-pod/test-pod" } }, "version" : "1.51", "x_IRC" : "irc://irc.perl.org/#perl-qa", "x_MailingList" : "http://lists.perl.org/list/pod-people-qa.html", "x_contributors" : [ "David E. Wheeler ", "Andy Lester ", "Paul Miller ", "Luca Ferrari ", "Karen Etheridge ", "ChrisWi ", "David Steinbrunner " ], "x_serialization_backend" : "JSON::PP version 2.27300" } Test-Pod-1.51/META.yml000600 000766 000024 00000002434 12546042050 014614 0ustar00etherstaff000000 000000 --- abstract: 'check for POD errors in files' author: - 'David E. Wheeler ' build_requires: File::Spec: '0' Pod::Simple: '3.05' Test::More: '0.62' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'ExtUtils::MakeMaker version 7.0524, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Test-Pod no_index: directory: - t - inc requires: File::Find: '0' Pod::Simple: '3.05' Test::Builder::Tester: '1.02' Test::More: '0.62' perl: '5.008' resources: bugtracker: http://github.com/perl-pod/test-pod/issues/ homepage: http://search.cpan.org/dist/Test-Pod/ license: http://dev.perl.org/licenses/ repository: https://github.com/perl-pod/test-pod.git version: '1.51' x_IRC: irc://irc.perl.org/#perl-qa x_MailingList: http://lists.perl.org/list/pod-people-qa.html x_contributors: - 'David E. Wheeler ' - 'Andy Lester ' - 'Paul Miller ' - 'Luca Ferrari ' - 'Karen Etheridge ' - 'ChrisWi ' - 'David Steinbrunner ' x_serialization_backend: 'CPAN::Meta::YAML version 0.016' Test-Pod-1.51/Makefile.PL000644 000766 000024 00000007276 12546041537 015347 0ustar00etherstaff000000 000000 use strict; use warnings; require 5.008; use ExtUtils::MakeMaker; my $developer = -f '.gitignore'; ExtUtils::MakeMaker->VERSION(6.98) if $developer; my %WriteMakefileArgs = ( NAME => 'Test::Pod', VERSION_FROM => 'lib/Test/Pod.pm', ABSTRACT_FROM => 'lib/Test/Pod.pm', AUTHOR => 'David E. Wheeler ', LICENSE => 'perl_5', META_MERGE => { 'meta-spec' => { version => 2 }, dynamic_config => 0, resources => { homepage => 'http://search.cpan.org/dist/Test-Pod/', license => ['http://dev.perl.org/licenses/'], repository => { url => 'https://github.com/perl-pod/test-pod.git', web => 'https://github.com/perl-pod/test-pod', type => 'git', }, bugtracker => { web => 'http://github.com/perl-pod/test-pod/issues/', }, }, x_MailingList => 'http://lists.perl.org/list/pod-people-qa.html', x_IRC => 'irc://irc.perl.org/#perl-qa', # maybe we should make a pod channel? x_contributors => [ # manually added, from git shortlog -e -s -n 'David E. Wheeler ', 'Andy Lester ', 'Paul Miller ', 'Luca Ferrari ', 'Karen Etheridge ', 'ChrisWi ', 'David Steinbrunner ', ], }, META_ADD => { prereqs => { configure => { requires => { 'ExtUtils::MakeMaker' => '0', }, }, runtime => { requires => { 'perl' => '5.008', 'File::Find' => '0', 'Pod::Simple' => '3.05', 'Test::Builder::Tester' => '1.02', 'Test::More' => '0.62', }, }, test => { requires => { 'File::Spec' => '0', 'Pod::Simple' => '3.05', 'Test::More' => '0.62', }, }, }, }, ); my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; for (qw(configure build test runtime)) { my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_} or exists $WriteMakefileArgs{$key}; my $r = $WriteMakefileArgs{$key} = { %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}}, %{delete $WriteMakefileArgs{$key} || {}}, }; defined $r->{$_} or delete $r->{$_} for keys %$r; } # dynamic prereqs get added here. $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; die 'attention developer: you need to do a sane meta merge here!' if keys %{$WriteMakefileArgs{BUILD_REQUIRES}}; $WriteMakefileArgs{BUILD_REQUIRES} = { %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, %{delete $WriteMakefileArgs{TEST_REQUIRES}} } if $eumm_version < 6.63_03; $WriteMakefileArgs{PREREQ_PM} = { %{$WriteMakefileArgs{PREREQ_PM}}, %{delete $WriteMakefileArgs{BUILD_REQUIRES}} } if $eumm_version < 6.55_01; delete $WriteMakefileArgs{CONFIGURE_REQUIRES} if $eumm_version < 6.51_03; delete $WriteMakefileArgs{MIN_PERL_VERSION} if $eumm_version < 6.48; delete @WriteMakefileArgs{qw(META_ADD META_MERGE)} if $eumm_version < 6.46; delete $WriteMakefileArgs{LICENSE} if $eumm_version < 6.31; WriteMakefile(%WriteMakefileArgs); Test-Pod-1.51/README000644 000766 000024 00000001207 12546037677 014253 0ustar00etherstaff000000 000000 Test/Pod version 1.51 ===================== This library's module, Test::Pod, provides an interface for validating POD in module files. INSTALLATION To install this module, type the following: perl Makefile.PL make make test make install Dependencies ------------ Test::Pod requires the following modules: * Pod::Simple 3.05 * Test::More 0.62 * Test::Builder::Tester 1.02 * File::Spec Copyright and Licence --------------------- Copyright 2006-2010, Andy Lester; 2010-2015 David E. Wheeler. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Test-Pod-1.51/lib/000700 000766 000024 00000000000 12546042050 014104 5ustar00etherstaff000000 000000 Test-Pod-1.51/t/000700 000766 000024 00000000000 12546042050 013601 5ustar00etherstaff000000 000000 Test-Pod-1.51/t/00-load.t000644 000766 000024 00000000366 12524451030 015137 0ustar00etherstaff000000 000000 #!perl -T use warnings; use strict; use Test::More tests => 2; BEGIN { use_ok( 'Test::Pod' ); use_ok( 'Pod::Simple' ); } diag( "Testing Test::Pod $Test::Pod::VERSION, Perl $], $^X" ); diag( "Using Pod::Simple $Pod::Simple::VERSION" ); Test-Pod-1.51/t/all_pod_files.t000644 000766 000024 00000001641 12524451030 016574 0ustar00etherstaff000000 000000 #!perl -Tw use strict; use Test::More tests => 2; BEGIN { use_ok( "Test::Pod" ); } my @expected; if ( $^O eq "VMS" ) { @expected = ( File::Spec->catfile( 'lib', 'Test', 'Pod.pm' ), File::Spec->catfile( 't', 'pod', 'good-pod-script.' ), File::Spec->catfile( 't', 'pod', 'good-pod-script.bat' ), File::Spec->catfile( 't', 'pod', 'good.pod' ), File::Spec->catfile( 't', 'pod', 'no_pod.pod' ), ); } else { # The expected files have slashes, not File::Spec separators, because # that's how File::Find does it. @expected = qw( lib/Test/Pod.pm t/pod/good-pod-script t/pod/good-pod-script.bat t/pod/good.pod t/pod/no_pod.pod ); } my @files = sort map { lc } all_pod_files( "lib", "t/pod" ); @expected = sort map { lc } @expected; s{\\}{/}g for @files, @expected; is_deeply( \@files, \@expected, "Got all the distro files" ); Test-Pod-1.51/t/cut-outside-block.pod000644 000766 000024 00000000227 12524451030 017653 0ustar00etherstaff000000 000000 # $Id: cut-outside-block.pod 48 2003-03-04 17:16:27Z petdance $ use strict; =cut =head1 COPYRIGHT Copyright 2002, Andy Lester =cut use warnings; Test-Pod-1.51/t/cut-outside-block.t000644 000766 000024 00000000604 12524451030 017333 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $file = 't/cut-outside-block.pod'; test_out( "not ok 1 - POD test for $file" ); pod_file_ok( $file ); test_fail(-1); test_diag( "$file (5): =cut found outside a pod block. Skipping to next block." ); test_test( "$file is bad" ); } Test-Pod-1.51/t/empty-file.pod000644 000766 000024 00000000000 12524451030 016356 0ustar00etherstaff000000 000000 Test-Pod-1.51/t/good.t000644 000766 000024 00000000677 12524451030 014740 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::Builder::Tester tests => 3; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } my $filename = "t/pod/good.pod"; GOOD: { test_out( "ok 1 - Blargo!" ); pod_file_ok( $filename, "Blargo!" ); test_test( 'Handles good.pod OK' ); } DEFAULT_NAME: { test_out( "ok 1 - POD test for t/pod/good.pod" ); pod_file_ok( $filename ); test_test( 'Handles good.pod OK, and builds default name OK' ); } Test-Pod-1.51/t/item-ordering.pod000644 000766 000024 00000000634 12524451030 017065 0ustar00etherstaff000000 000000 # $Id: item-ordering.pod 53 2003-03-04 17:41:18Z petdance $ =head1 COPYRIGHT Copyright 2002, Andy Lester =cut # Here's a list with items out of order =over 4 =item 2 This is the first prime number =item 3 This is the second prime number =item 5 This is the third prime number =back =cut # Here's a list with items that can't be =over 4 Blah blah blah =item 1 Item One =item 2 Item 2 =cut Test-Pod-1.51/t/item-ordering.t000644 000766 000024 00000002445 12524451030 016550 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } my $file = 't/item-ordering.pod'; test_out( "not ok 1 - POD test for $file" ); pod_file_ok( $file ); test_fail(-1); test_diag( ( Pod::Simple->VERSION == 3.24 ? ( "$file (17): Expected text matching /\\s+[^\\*\\d]/ after '=item'", "$file (21): Expected text matching /\\s+[^\\*\\d]/ after '=item'", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", ) : Pod::Simple->VERSION >= 3.27 ? ( "$file (17): Expected text after =item, not a number", "$file (21): Expected text after =item, not a number", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", "$file (32): =over without closing =back", ) : Pod::Simple->VERSION >= 3.25 ? ( "$file (17): Expected text after =item, not a number", "$file (21): Expected text after =item, not a number", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", ) : ( "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", )) ); test_test( "$file is bad" ); Test-Pod-1.51/t/load.t000644 000766 000024 00000000112 12524451030 014707 0ustar00etherstaff000000 000000 #!perl -T use Test::More tests=>1; BEGIN { use_ok( 'Test::Pod' ); } Test-Pod-1.51/t/missing-file.t000644 000766 000024 00000001142 12524451030 016362 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::Builder::Tester tests => 3; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } MISSING_FILE: { my $file = 't/non-existent.pod'; test_out( "not ok 1 - I hope the file is there" ); test_fail(+1); pod_file_ok( $file, "I hope the file is there" ); test_diag( "$file does not exist" ); test_test( "$file is bad" ); } MISSING_FILE_NO_MESSAGE: { my $file = 't/non-existent.pod'; test_out( "not ok 1 - POD test for $file" ); test_fail(+1); pod_file_ok( $file ); test_diag( "$file does not exist" ); test_test( "$file is bad" ); } Test-Pod-1.51/t/pod/000700 000766 000024 00000000000 12546042050 014363 5ustar00etherstaff000000 000000 Test-Pod-1.51/t/selftest.t000644 000766 000024 00000000225 12524451030 015626 0ustar00etherstaff000000 000000 #!perl -T use Test::More tests=>2; BEGIN { use_ok( "Test::Pod" ); } my $self = $INC{'Test/Pod.pm'}; pod_file_ok($self, "My own pod is OK"); Test-Pod-1.51/t/spaced-directives.pod000644 000766 000024 00000000557 12524451030 017722 0ustar00etherstaff000000 000000 =head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION This is a pod file where there are invisible spaces on either side of directives. One row of spaces is just before the AUTHOR directive, and one is right after the COPYRIGHT. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.51/t/spaced-directives.t000644 000766 000024 00000001224 12524451030 017373 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::More skip_all => "Not written yet"; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $name = 'Test name: Something not likely to accidentally occur!'; my $file = 't/spaced-directives.pod'; test_out( "not ok 1 - $name" ); pod_file_ok( $file, $name ); test_fail(-1); test_diag('*** WARNING: line containing nothing but whitespace in paragraph at line 11 in file t/spaced-directives.pod'); test_diag('*** WARNING: line containing nothing but whitespace in paragraph at line 17 in file t/spaced-directives.pod'); test_test( "$name is bad" ); } Test-Pod-1.51/t/unknown-directive.pod000644 000766 000024 00000000535 12524451030 017773 0ustar00etherstaff000000 000000 # $Id: unknown-directive.pod 91 2004-01-26 03:50:06Z petdance $ =head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION =over4 This is a pod file with an incorrect =over. =under 4 This is a pod file with a bad directive. =head1 AUTHOR brian d foy, Ebdfoy@cpan.orgE =head1 COPYRIGHT Copyright 2002, brian d foy =cut Test-Pod-1.51/t/unknown-directive.t000644 000766 000024 00000000735 12524451030 017456 0ustar00etherstaff000000 000000 #!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $name = 'Test name: Something not likely to accidentally occur!'; my $file = 't/unknown-directive.pod'; test_out( "not ok 1 - $name" ); pod_file_ok( $file, $name ); test_fail(-1); test_diag( "$file (9): Unknown directive: =over4",); test_diag( "$file (13): Unknown directive: =under",); test_test( "$name is bad" ); } Test-Pod-1.51/t/pod/good-pod-script000644 000766 000024 00000000360 12524451030 017327 0ustar00etherstaff000000 000000 #!/usr/bin/perl =head1 NAME This is a pretend script that we need to check =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.51/t/pod/good-pod-script.bat000644 000766 000024 00000001202 12524451030 020070 0ustar00etherstaff000000 000000 @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!/usr/bin/perl #line 15 =head1 NAME This is a pretend script that we need to check =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut __END__ :endofperl Test-Pod-1.51/t/pod/good.pod000644 000766 000024 00000000326 12524451030 016030 0ustar00etherstaff000000 000000 =head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.51/t/pod/no_pod.pod000644 000766 000024 00000000224 12524451030 016353 0ustar00etherstaff000000 000000 Test::Pod test pod -- a valid pod file This is a pod file without pod commands Andy Lester, garbage-address@aol.com Copyright 2004, Andy Lester Test-Pod-1.51/lib/Test/000700 000766 000024 00000000000 12546042050 015023 5ustar00etherstaff000000 000000 Test-Pod-1.51/lib/Test/Pod.pm000644 000766 000024 00000016555 12546035726 016145 0ustar00etherstaff000000 000000 package Test::Pod; use strict; =head1 NAME Test::Pod - check for POD errors in files =head1 VERSION Version 1.51 =cut our $VERSION = '1.51'; =head1 SYNOPSIS C lets you check the validity of a POD file, and report its results in standard C fashion. use Test::Pod tests => $num_tests; pod_file_ok( $file, "Valid POD file" ); Module authors can include the following in a F file and have C automatically find and check all POD files in a module distribution: use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); You can also specify a list of files to check, using the C function supplied: use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; my @poddirs = qw( blib script ); all_pod_files_ok( all_pod_files( @poddirs ) ); Or even (if you're running under L): use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; my @poddirs = qw( blib script ); use File::Spec::Functions qw( catdir updir ); all_pod_files_ok( all_pod_files( map { catdir updir, $_ } @poddirs ) ); =head1 DESCRIPTION Check POD files for errors or warnings in a test file, using C to do the heavy lifting. =cut use 5.008; use Test::Builder; use Pod::Simple; our %ignore_dirs = ( '.bzr' => 'Bazaar', '.git' => 'Git', '.hg' => 'Mercurial', '.pc' => 'quilt', '.svn' => 'Subversion', CVS => 'CVS', RCS => 'RCS', SCCS => 'SCCS', _darcs => 'darcs', _sgbak => 'Vault/Fortress', ); my $Test = Test::Builder->new; sub import { my $self = shift; my $caller = caller; for my $func ( qw( pod_file_ok all_pod_files all_pod_files_ok ) ) { no strict 'refs'; *{$caller."::".$func} = \&$func; } $Test->exported_to($caller); $Test->plan(@_); } sub _additional_test_pod_specific_checks { my ($ok, $errata, $file) = @_; return $ok; } =head1 FUNCTIONS =head2 pod_file_ok( FILENAME[, TESTNAME ] ) C will okay the test if the POD parses correctly. Certain conditions are not reported yet, such as a file with no pod in it at all. When it fails, C will show any pod checking errors as diagnostics. The optional second argument TESTNAME is the name of the test. If it is omitted, C chooses a default test name "POD test for FILENAME". =cut sub pod_file_ok { my $file = shift; my $name = @_ ? shift : "POD test for $file"; if ( !-f $file ) { $Test->ok( 0, $name ); $Test->diag( "$file does not exist" ); return; } my $checker = Pod::Simple->new; $checker->output_string( \my $trash ); # Ignore any output $checker->parse_file( $file ); my $ok = !$checker->any_errata_seen; $ok = _additional_test_pod_specific_checks( $ok, ($checker->{errata}||={}), $file ); $name .= ' (no pod)' if !$checker->content_seen; $Test->ok( $ok, $name ); if ( !$ok ) { my $lines = $checker->{errata}; for my $line ( sort { $a<=>$b } keys %$lines ) { my $errors = $lines->{$line}; $Test->diag( "$file ($line): $_" ) for @$errors; } } return $ok; } # pod_file_ok =head2 all_pod_files_ok( [@entries] ) Checks all the files under C<@entries> for valid POD. It runs L on directories and assumes everything else to be a file to be tested. It calls the C function for you (one test for each file), so you can't have already called C. If C<@entries> is empty or not passed, the function finds all POD files in files in the F directory if it exists, or the F directory if not. A POD file is one that ends with a Perl extension (F<.pod>, F<.pl>, F<.pm>, F<.PL>, F<.t>), where the first line looks like a Perl shebang, or a batch file (F<.bat>) starting with a line containing C<--*-Perl-*-->. If you're testing a module, just make a F: use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Returns true if all pod files are ok, or false if any fail. =cut sub all_pod_files_ok { my @args = @_ ? @_ : _starting_points(); my @files = map { -d $_ ? all_pod_files($_) : $_ } @args; unless (@files) { $Test->skip_all( "No files found in (@args)\n" ); return 1; } $Test->plan( tests => scalar @files ); my $ok = 1; foreach my $file ( @files ) { pod_file_ok( $file ) or undef $ok; } return $ok; } =head2 all_pod_files( [@dirs] ) Returns a list of all the Perl files in I<@dirs> and in directories below. If no directories are passed, it defaults to F if F exists, or else F if not. Skips any files in F, F<.svn>, F<.git> and similar directories. See C<%Test::Pod::ignore_dirs> for a list of them. A Perl file is: =over 4 =item * Any file that ends in F<.PL>, F<.pl>, F<.PL>, F<.pm>, F<.pod>, or F<.t>. =item * Any file that has a first line with a shebang and "perl" on it. =item * Any file that ends in F<.bat> and has a first line with "--*-Perl-*--" on it. =back The order of the files returned is machine-dependent. If you want them sorted, you'll have to sort them yourself. =cut sub all_pod_files { my @pod; require File::Find; File::Find::find({ preprocess => sub { grep { !exists $ignore_dirs{$_} || !-d File::Spec->catfile($File::Find::dir, $_) } @_ }, wanted => sub { -f $_ && _is_perl($_) && push @pod, $File::Find::name }, no_chdir => 1, }, @_ ? @_ : _starting_points()); return @pod; } sub _starting_points { return 'blib' if -e 'blib'; return 'lib'; } sub _is_perl { my $file = shift; # accept as a Perl file everything that ends with a well known Perl suffix ... return 1 if $file =~ /[.](?:PL|p(?:[lm]|od)|t)$/; open my $fh, '<', $file or return; my $first = <$fh>; close $fh; return unless $first; # ... or that has a she-bang as first line ... return 1 if $first =~ /^#!.*perl/; # ... or that is a .bat ad has a Perl comment line first return 1 if $file =~ /[.]bat$/i && $first =~ /--[*]-Perl-[*]--/; return; } =head1 SUPPORT This module is managed in an open L. Feel free to fork and contribute, or to clone L and send patches! Found a bug? Please L or L a report! =head1 AUTHORS =over =item David E. Wheeler Current maintainer. =item Andy Lester C<< >> Maintainer emeritus. =item brian d foy Orinal author. =back =head1 ACKNOWLEDGEMENTS Thanks brian d foy for the original code, and to these folks for contributions: =over =item * Andy Lester =item * David E. Wheeler =item * Paul Miller =item * Peter Edwards =item * Luca Ferrari =back =head1 COPYRIGHT AND LICENSE Copyright 2006-2010, Andy Lester; 2010-2015 David E. Wheeler. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1;