From 797c49c7c153f443cb1c085364f0d118bd7e00cb Mon Sep 17 00:00:00 2001 From: brian d foy Date: Fri, 8 Dec 2023 18:32:49 -0500 Subject: [PATCH] Fix up some repo details for continued maintenance (#68) * Turn Makefile.PL into a modulino * Show current maintainer (brian d foy) * Need to handle default package MY for SUPER to work out * Update the minimum Perl to v5.10 Pod::Man and podlators, which do the heavy lifting, require this. * Update current maintainer --- Makefile.PL | 200 ++++++++++++++++++++++++----------- lib/Pod/Perldoc.pm | 7 +- lib/Pod/Perldoc/BaseTo.pm | 4 +- lib/Pod/Perldoc/GetOptsOO.pm | 4 +- lib/Pod/Perldoc/ToANSI.pm | 6 +- lib/Pod/Perldoc/ToChecker.pm | 4 +- lib/Pod/Perldoc/ToMan.pm | 6 +- lib/Pod/Perldoc/ToNroff.pm | 4 +- lib/Pod/Perldoc/ToPod.pm | 4 +- lib/Pod/Perldoc/ToRtf.pm | 4 +- lib/Pod/Perldoc/ToText.pm | 5 +- lib/Pod/Perldoc/ToTk.pm | 8 +- lib/Pod/Perldoc/ToXml.pm | 5 +- 13 files changed, 172 insertions(+), 89 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index f76d364..5f712bf 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,61 +1,3 @@ -use 5.006; -use strict; -use warnings; - -use ExtUtils::MakeMaker; - -my $EUMM_VERSION = $ExtUtils::MakeMaker::VERSION; - -WriteMakefile( - 'NAME' => 'Pod::Perldoc', - 'VERSION_FROM' => 'lib/Pod/Perldoc.pm', - - 'AUTHOR' => 'Mark Allen ', # maintainer - 'ABSTRACT_FROM' => 'lib/Pod/Perldoc.pm', - - 'PREREQ_PM' => { - # Are there any hard dependencies not covered here? - 'Config' => '0', - 'Encode' => '0', - 'Fcntl' => '0', - 'File::Spec::Functions' => '0', - 'File::Temp' => '0.22', - 'IO::Select' => '0', - 'parent' => '0', - 'Pod::Man' => '2.18', - 'Pod::Simple::RTF' => '3.16', - 'Pod::Simple::XMLOutStream' => '3.16', - 'Pod::Text' => '0', - 'strict' => '0', - 'Symbol' => '0', - 'Test::More' => '0', - 'Text::ParseWords' => '0', - 'warnings' => '0', - }, - - ($ENV{PERL_CORE} ? () : ('EXE_FILES' => [qw( perldoc )])), - - 'META_MERGE' => { - no_index => { - directory => 'corpus', - }, - resources => { - repository => 'https://github.com/mrallen1/Pod-Perldoc.git', - }, - }, - - ($ENV{PERL_CORE} ? () : - ('MAN1PODS' => { 'perldoc.pod' => 'blib/man1/perldoc.1' })), - - ($^V >= 5.008001 && $^V < 5.012 ? ( 'INSTALLDIRS' => 'perl' ) : ()), - - ( $EUMM_VERSION > 6.31 ? ( - 'LICENSE' => 'perl', - ) : () ), - - test => {TESTS => 't/*.t t/*/*.t'} -); - package MY; sub libscan @@ -74,4 +16,144 @@ sub init_dirscan return; } -__END__ + +package Pod::Perldoc; +use strict; +use warnings; + +=encoding utf8 + +=head1 The build file for Pod::Perldoc + +This build file is a modulino; it works as both a build script and +a module. + +To build the distribution, run this file normally: + + % perl Makefile.PL + +But, it's more interesting than that. You can load it with C +and call C to get the data structure it passes to +C: + + my $package = require '/path/to/Makefile.PL'; + my $arguments = $package->arguments; + +Note that C-ing a file makes an entry in C<%INC> for exactly +that name. If you try to C another file with the same name, +even from a different path, C thinks it has already loaded +the file. As such, I recommend you always require the full path to the +file. + +The return value of the C is a package name (in this case, +the name of the main module. Use that to call the C method. + +Even if this distribution needs a higher version of Perl, this bit +only needs v5.8. You can play with the data structure with a primitive +Perl. + +=cut + +use ExtUtils::MakeMaker; +use File::Spec::Functions qw(catfile); + +my $module = __PACKAGE__; +( my $dist = $module ) =~ s/::/-/g; + +my $github = 'https://github.com/briandfoy/pod-perldoc'; +my $main_file = catfile( 'lib', split /::/, "$module.pm" ); + +my %WriteMakefile = ( + 'MIN_PERL_VERSION' => '5.010', + + 'NAME' => $module, + 'ABSTRACT_FROM' => $main_file, + 'VERSION_FROM' => $main_file, + 'AUTHOR' => 'Sean M. Burke ', # maintained by brian d foy, bdfoy@cpan.org + + 'CONFIGURE_REQUIRES' => { + 'ExtUtils::MakeMaker' => '6.64', + 'File::Spec::Functions' => '0', + }, + + 'BUILD_REQUIRES' => { + }, + + 'TEST_REQUIRES' => { + 'Test::More' => '1', + }, + + 'PREREQ_PM' => { + 'Config' => '0', + 'Encode' => '0', + 'Fcntl' => '0', + 'File::Spec::Functions' => '0', + 'File::Temp' => '0.22', + 'IO::Select' => '0', + 'parent' => '0', + 'Pod::Man' => '2.18', + 'Pod::Simple::RTF' => '3.16', + 'Pod::Simple::XMLOutStream' => '3.16', + 'Pod::Text' => '0', + 'strict' => '0', + 'Symbol' => '0', + 'Test::More' => '0', + 'Text::ParseWords' => '0', + 'warnings' => '0', + }, + + 'META_MERGE' => { + 'meta-spec' => { version => 2 }, + no_index => { + directory => 'corpus', + }, + resources => { + repository => { + type => 'git', + url => $github, + web => $github, + }, + homepage => $github, + }, + }, + + ( ExtUtils::MakeMaker->VERSION > 6.31 ? ( 'LICENSE' => 'perl' ) : () ), + + ( $ENV{PERL_CORE} ? () : ( + 'MAN1PODS' => { 'perldoc.pod' => 'blib/man1/perldoc.1' }, + 'EXE_FILES' => [qw( perldoc )], + ) + ), + + + ($^V >= 5.008001 && $^V < 5.012 ? ( 'INSTALLDIRS' => 'perl' ) : ()), + + test => {TESTS => 't/*.t t/*/*.t'}, + + 'clean' => { FILES => "$dist-*" }, + ); + +sub arguments { \%WriteMakefile } + +do_it() unless caller; +sub do_it { + require File::Spec; + my $MM ='ExtUtils::MakeMaker'; + my $MM_version = + eval{ "$MM " . $WriteMakefile{'CONFIGURE_REQUIRES'}{'ExtUtils::MakeMaker'} } + || + "$MM 6.64"; + eval "use $MM_version; 1" or die "Could not load $MM_version: $@"; + eval "use Test::Manifest 1.21" + if -e File::Spec->catfile( qw(t test_manifest) ); + + my $arguments = arguments(); + my $minimum_perl = $arguments->{MIN_PERL_VERSION} || '5.008'; + eval "require $minimum_perl;" or die $@; + + WriteMakefile( %$arguments ); + } + +no warnings; + +__PACKAGE__; diff --git a/lib/Pod/Perldoc.pm b/lib/Pod/Perldoc.pm index 513320d..81192dd 100644 --- a/lib/Pod/Perldoc.pm +++ b/lib/Pod/Perldoc.pm @@ -1,4 +1,4 @@ -use 5.006; # we use some open(X, "<", $y) syntax +use 5.010; # podlaters and Pod::Man require this package Pod::Perldoc; use strict; @@ -2147,11 +2147,12 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> + =cut diff --git a/lib/Pod/Perldoc/BaseTo.pm b/lib/Pod/Perldoc/BaseTo.pm index 37f6510..946b315 100644 --- a/lib/Pod/Perldoc/BaseTo.pm +++ b/lib/Pod/Perldoc/BaseTo.pm @@ -144,10 +144,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/GetOptsOO.pm b/lib/Pod/Perldoc/GetOptsOO.pm index afa2574..0f26b73 100644 --- a/lib/Pod/Perldoc/GetOptsOO.pm +++ b/lib/Pod/Perldoc/GetOptsOO.pm @@ -151,10 +151,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToANSI.pm b/lib/Pod/Perldoc/ToANSI.pm index 8217c7b..e686d4a 100644 --- a/lib/Pod/Perldoc/ToANSI.pm +++ b/lib/Pod/Perldoc/ToANSI.pm @@ -45,7 +45,7 @@ sub parse_from_file { =head1 NAME -Pod::Perldoc::ToANSI - render Pod with ANSI color escapes +Pod::Perldoc::ToANSI - render Pod with ANSI color escapes =head1 SYNOPSIS @@ -85,10 +85,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToChecker.pm b/lib/Pod/Perldoc/ToChecker.pm index a6dbbe3..f1fc688 100644 --- a/lib/Pod/Perldoc/ToChecker.pm +++ b/lib/Pod/Perldoc/ToChecker.pm @@ -67,10 +67,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm index 2f1d7b0..bdbad4d 100644 --- a/lib/Pod/Perldoc/ToMan.pm +++ b/lib/Pod/Perldoc/ToMan.pm @@ -1,4 +1,4 @@ -require 5.006; +require 5.010; # Pod::Man requires this package Pod::Perldoc::ToMan; use strict; use warnings; @@ -559,10 +559,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToNroff.pm b/lib/Pod/Perldoc/ToNroff.pm index a52f616..612e4d3 100644 --- a/lib/Pod/Perldoc/ToNroff.pm +++ b/lib/Pod/Perldoc/ToNroff.pm @@ -94,10 +94,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToPod.pm b/lib/Pod/Perldoc/ToPod.pm index 825a1ca..67c06b0 100644 --- a/lib/Pod/Perldoc/ToPod.pm +++ b/lib/Pod/Perldoc/ToPod.pm @@ -77,10 +77,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToRtf.pm b/lib/Pod/Perldoc/ToRtf.pm index d084816..23cc595 100644 --- a/lib/Pod/Perldoc/ToRtf.pm +++ b/lib/Pod/Perldoc/ToRtf.pm @@ -72,10 +72,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> diff --git a/lib/Pod/Perldoc/ToText.pm b/lib/Pod/Perldoc/ToText.pm index 99ab66c..282baf3 100644 --- a/lib/Pod/Perldoc/ToText.pm +++ b/lib/Pod/Perldoc/ToText.pm @@ -86,13 +86,12 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> - =cut diff --git a/lib/Pod/Perldoc/ToTk.pm b/lib/Pod/Perldoc/ToTk.pm index 6ca7542..d8b555e 100644 --- a/lib/Pod/Perldoc/ToTk.pm +++ b/lib/Pod/Perldoc/ToTk.pm @@ -141,12 +141,12 @@ L, L =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> -Adriano R. Ferreira C<< >>; -Sean M. Burke C<< >>; +Mark Allen C<< >> +Adriano R. Ferreira C<< >>, +Sean M. Burke C<< >> significant portions copied from F in the Tk::Pod dist, by Nick Ing-Simmons, Slaven Rezic, et al. diff --git a/lib/Pod/Perldoc/ToXml.pm b/lib/Pod/Perldoc/ToXml.pm index 0161c04..468bba2 100644 --- a/lib/Pod/Perldoc/ToXml.pm +++ b/lib/Pod/Perldoc/ToXml.pm @@ -52,12 +52,13 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Current maintainer: Mark Allen C<< >> +Current maintainer: brian d foy C<< >> Past contributions from: -brian d foy C<< >> +Mark Allen C<< >> Adriano R. Ferreira C<< >>, Sean M. Burke C<< >> + =cut