diff options
author | Karen Etheridge <ether@cpan.org> | 2016-01-03 11:05:17 -0800 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2016-01-03 14:46:00 -0500 |
commit | 849dc6836a2f0fc6c752421bfc04c26a8a939dc9 (patch) | |
tree | b5cbe187f34090d64944123ed74f1a54f8bad309 /cpan | |
parent | 398a990f4831b43774f3ef6405e1fa6d326d23a1 (diff) | |
download | perl-849dc6836a2f0fc6c752421bfc04c26a8a939dc9.tar.gz |
update podlators to 4.04
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/podlators/.gitignore | 4 | ||||
-rw-r--r-- | cpan/podlators/Changes | 12 | ||||
-rw-r--r-- | cpan/podlators/Makefile.PL | 119 | ||||
-rw-r--r-- | cpan/podlators/bin/pod2man | 2 | ||||
-rw-r--r-- | cpan/podlators/bin/pod2text | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/Man.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/ParseLink.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/Text.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/Text/Color.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/Text/Overstrike.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/lib/Pod/Text/Termcap.pm | 2 | ||||
-rw-r--r-- | cpan/podlators/t/docs/synopsis.t | 16 | ||||
-rw-r--r-- | cpan/podlators/t/lib/Test/Podlators.pm | 4 |
13 files changed, 150 insertions, 21 deletions
diff --git a/cpan/podlators/.gitignore b/cpan/podlators/.gitignore index b7e08fd5f4..3a7bb2eb06 100644 --- a/cpan/podlators/.gitignore +++ b/cpan/podlators/.gitignore @@ -1,11 +1,9 @@ -/pod2man* -/pod2text* /.travis.yml /LICENSE /MANIFEST /MANIFEST.SKIP -/META.yml /META.json +/META.yml /NOTES /README /THANKS diff --git a/cpan/podlators/Changes b/cpan/podlators/Changes index a632a0b057..ac05330707 100644 --- a/cpan/podlators/Changes +++ b/cpan/podlators/Changes @@ -1,5 +1,17 @@ User-Visible podlators Changes +podlators 4.04 (2016-01-02) + + Fix portability of the t/docs/synopsis.t test to Windows. It was + assuming UNIX path delimiters when filtering out files it didn't + intend to test. + + Don't include .travis.yml in the distribution so that it isn't picked + up by Perl core. Thanks, Karen Etheridge. (#110385) + + Add homepage information to the CPAN metadata and change the canonical + repository location to GitHub. + podlators 4.03 (2015-12-06) Fix tests when POD_MAN_DATE or SOURCE_DATE_EPOCH are already set in diff --git a/cpan/podlators/Makefile.PL b/cpan/podlators/Makefile.PL index 5db6c15230..074a35b728 100644 --- a/cpan/podlators/Makefile.PL +++ b/cpan/podlators/Makefile.PL @@ -1,13 +1,118 @@ +# Build instructions for podlators. +# +# We need to use ExtUtils::MakeMaker since this module is part of Perl core, +# which only supports that build method, and because it is a dependency of +# other build systems like Module::Build. +# +# Copyright 1999, 2000, 2001, 2008, 2010, 2012, 2014, 2015, 2016 +# Russ Allbery <rra@cpan.org> +# +# This program is free software; you may redistribute it and/or modify it +# under the same terms as Perl itself. + +use 5.006; use strict; use warnings; +use Config; use ExtUtils::MakeMaker; +use File::Spec; + +# Generate full paths for scripts distributed in the bin directory. +# +# @scripts - List of script names +# +# Returns: List of relative paths from top of distribution +sub scripts { + my (@scripts) = @_; + return map { File::Spec->catfile('bin', $_) } @scripts; +} + +# Generate an association between a source file and a destination man page for +# non-module man pages. ExtUtils::MakeMaker only really understands how to +# generate man pages for modules, so we need to help it for the script man +# pages and (particularly) the perlpodstyle man page. +# +# $directory - Directory containing the file +# $file - File containing POD in that directory +# +# Returns: The path to the file with POD and the output man page, as a pair +sub man1pod { + my ($directory, $file) = @_; + + # Determine the base name of the file by stripping any *.pod suffix. + my $basename = $file; + $basename =~ s{ [.]pod }{}xms; + + # Determine the output file name for the generated man page. + my $outname = $basename . q{.} . $Config{man1ext}; + my $outpath = File::Spec->catfile(qw(blib man1), $outname); + return (File::Spec->catfile($directory, $file), $outpath); +} + +# The hash of all the metadata. This will be modified before WriteMakefile to +# remove keys not supported by the local version of ExtUtils::MakeMaker. +my %metadata = ( + NAME => 'Pod', + DISTNAME => 'podlators', + ABSTRACT => 'Convert POD data to various other formats', + AUTHOR => 'Russ Allbery <rra@cpan.org>', + LICENSE => 'perl', + EXE_FILES => [scripts('pod2text', 'pod2man')], + VERSION_FROM => 'lib/Pod/Man.pm', + MIN_PERL_VERSION => '5.006', + + # Override the files that generate section 1 man pages. + # (done differently in blead) + #MAN1PODS => { + # man1pod('bin', 'pod2man'), + # man1pod('bin', 'pod2text'), + # man1pod('pod', 'perlpodstyle'), + #}, -WriteMakefile( - NAME => 'Pod', - DISTNAME => 'podlators', - VERSION_FROM => 'lib/Pod/Man.pm', - EXE_FILES => [ 'bin/pod2man', 'bin/pod2text' ], - AUTHOR => 'Russ Allbery (rra@stanford.edu)', - ABSTRACT => 'Convert POD data to various other formats' + # Dependencies on other modules. + PREREQ_PM => { + 'Encode' => 0, + 'Pod::Simple' => 3.06, + }, + + # ExtUtils::MakeMaker doesn't pick up nested test directories by default. + test => { TESTS => 't/*/*.t' }, + + # For older versions of Perl, we have to force installation into the Perl + # module directories since site modules did not take precedence over core + # modules. + INSTALLDIRS => $] lt '5.011' ? 'perl' : 'site', + + # Additional metadata. + META_ADD => { + 'meta-spec' => { version => 2 }, + resources => { + bugtracker => + 'https://rt.cpan.org/Public/Dist/Display.html?Name=podlators', + homepage => 'http://www.eyrie.org/~eagle/software/podlators/', + repository => { + url => 'git://github.com/rra/podlators.git', + web => 'https://github.com/rra/podlators', + type => 'git', + }, + }, + }, ); + +# Remove keys that aren't supported by this version of ExtUtils::MakeMaker. +# This hash maps keys to the minimum supported version. +my %supported = ( + LICENSE => 6.31, + META_ADD => 6.46, + MIN_PERL_VERSION => 6.48, +); +for my $key (keys(%supported)) { + if ($ExtUtils::MakeMaker::VERSION < $supported{$key}) { + delete $metadata{$key}; + } +} + +# Generate the actual Makefile. Pick an arbitrary module to pull the version +# from, since they should all have the same version. +WriteMakefile(%metadata); diff --git a/cpan/podlators/bin/pod2man b/cpan/podlators/bin/pod2man index 203e75f46f..46de7a7c18 100644 --- a/cpan/podlators/bin/pod2man +++ b/cpan/podlators/bin/pod2man @@ -1,4 +1,4 @@ -#!perl +#!/usr/bin/perl # pod2man -- Convert POD data to formatted *roff input. # diff --git a/cpan/podlators/bin/pod2text b/cpan/podlators/bin/pod2text index 9394f0f095..838f75ec1d 100644 --- a/cpan/podlators/bin/pod2text +++ b/cpan/podlators/bin/pod2text @@ -1,4 +1,4 @@ -#!perl +#!/usr/bin/perl # pod2text -- Convert POD data to formatted ASCII text. # diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm index 0d2edd0ea3..f3f4f81593 100644 --- a/cpan/podlators/lib/Pod/Man.pm +++ b/cpan/podlators/lib/Pod/Man.pm @@ -38,7 +38,7 @@ use Pod::Simple (); @ISA = qw(Pod::Simple); -$VERSION = '4.03'; +$VERSION = '4.04'; # Set the debugging level. If someone has inserted a debug function into this # class already, use that. Otherwise, use any Pod::Simple debug function diff --git a/cpan/podlators/lib/Pod/ParseLink.pm b/cpan/podlators/lib/Pod/ParseLink.pm index 8d9d7ce7f3..4c6843d443 100644 --- a/cpan/podlators/lib/Pod/ParseLink.pm +++ b/cpan/podlators/lib/Pod/ParseLink.pm @@ -31,7 +31,7 @@ use Exporter; @ISA = qw(Exporter); @EXPORT = qw(parselink); -$VERSION = '4.03'; +$VERSION = '4.04'; ############################################################################## # Implementation diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm index f8033cced7..b0f1afcbce 100644 --- a/cpan/podlators/lib/Pod/Text.pm +++ b/cpan/podlators/lib/Pod/Text.pm @@ -39,7 +39,7 @@ use Pod::Simple (); # We have to export pod2text for backward compatibility. @EXPORT = qw(pod2text); -$VERSION = '4.03'; +$VERSION = '4.04'; ############################################################################## # Initialization diff --git a/cpan/podlators/lib/Pod/Text/Color.pm b/cpan/podlators/lib/Pod/Text/Color.pm index 01025538f8..cb23aab2d5 100644 --- a/cpan/podlators/lib/Pod/Text/Color.pm +++ b/cpan/podlators/lib/Pod/Text/Color.pm @@ -27,7 +27,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(Pod::Text); -$VERSION = '4.03'; +$VERSION = '4.04'; ############################################################################## # Overrides diff --git a/cpan/podlators/lib/Pod/Text/Overstrike.pm b/cpan/podlators/lib/Pod/Text/Overstrike.pm index 0aaabd5c59..240aa851f6 100644 --- a/cpan/podlators/lib/Pod/Text/Overstrike.pm +++ b/cpan/podlators/lib/Pod/Text/Overstrike.pm @@ -35,7 +35,7 @@ use Pod::Text (); @ISA = qw(Pod::Text); -$VERSION = '4.03'; +$VERSION = '4.04'; ############################################################################## # Overrides diff --git a/cpan/podlators/lib/Pod/Text/Termcap.pm b/cpan/podlators/lib/Pod/Text/Termcap.pm index 3f7f53deb2..5a5e314241 100644 --- a/cpan/podlators/lib/Pod/Text/Termcap.pm +++ b/cpan/podlators/lib/Pod/Text/Termcap.pm @@ -28,7 +28,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(Pod::Text); -$VERSION = '4.03'; +$VERSION = '4.04'; ############################################################################## # Overrides diff --git a/cpan/podlators/t/docs/synopsis.t b/cpan/podlators/t/docs/synopsis.t index 3d5b44a20f..3cdcbab21c 100644 --- a/cpan/podlators/t/docs/synopsis.t +++ b/cpan/podlators/t/docs/synopsis.t @@ -33,6 +33,7 @@ use warnings; use lib 't/lib'; +use File::Spec; use Test::More; use Test::RRA qw(skip_unless_automated use_prereq); @@ -43,12 +44,25 @@ skip_unless_automated('Synopsis syntax tests'); use_prereq('Perl::Critic::Utils'); use_prereq('Test::Synopsis'); +# Helper function that checks to see if a given path starts with blib/script. +# This is written a bit weirdly so that it's portable to Windows and VMS. +# +# $path - Path to a file +# +# Returns: True if the file doesn't start with blib/script, false otherwise. +sub in_blib_script { + my ($path) = @_; + my ($volume, $dir, $file) = File::Spec->splitpath($path); + my @dir = File::Spec->splitdir($dir); + return (scalar(@dir) < 2 || $dir[0] ne 'blib' || $dir[1] ne 'script'); +} + # The default Test::Synopsis all_synopsis_ok() function requires that the # module be in a lib directory. Use Perl::Critic::Utils to find the modules # in blib, or lib if it doesn't exist. However, strip out anything in # blib/script, since scripts use a different SYNOPSIS syntax. my @files = Perl::Critic::Utils::all_perl_files('blib'); -@files = grep { !m{blib/script/}xms } @files; +@files = grep { in_blib_script($_) } @files; if (!@files) { @files = Perl::Critic::Utils::all_perl_files('lib'); } diff --git a/cpan/podlators/t/lib/Test/Podlators.pm b/cpan/podlators/t/lib/Test/Podlators.pm index 77945574ec..33bbb652a6 100644 --- a/cpan/podlators/t/lib/Test/Podlators.pm +++ b/cpan/podlators/t/lib/Test/Podlators.pm @@ -66,7 +66,7 @@ END { sub _stderr_save { my $tmpdir = File::Spec->catdir('t', 'tmp'); if (!-d $tmpdir) { - mkdir('t/tmp', 0777) or BAIL_OUT("cannot create t/tmp: $!"); + mkdir($tmpdir, 0777) or BAIL_OUT("cannot create $tmpdir: $!"); } my $path = File::Spec->catfile($tmpdir, "out$$.err"); @@ -309,7 +309,7 @@ sub test_snippet_with_io { # directive. my $tmpdir = File::Spec->catdir('t', 'tmp'); if (!-d $tmpdir) { - mkdir($tmpdir, 0777); + mkdir($tmpdir, 0777) or BAIL_OUT("cannot create $tmpdir: $!"); } my $input_file = File::Spec->catfile('t', 'tmp', "tmp$$.pod"); open(my $input, '>', $input_file) |