Permalink
Browse files

Importing Pod::Readme 0.09 from CPAN.

I've taken over maintainership of this module from Robert, so getting it under
version control here on Github so I can start addressing some of the RT tickets.
  • Loading branch information...
0 parents commit 115f98f7fdc0db90dab26e49f8850a6a9028ab1b @bigpresh committed Apr 13, 2010
Showing with 983 additions and 0 deletions.
  1. +33 −0 Build.PL
  2. +51 −0 Changes
  3. +12 −0 MANIFEST
  4. +30 −0 META.yml
  5. +21 −0 Makefile.PL
  6. +92 −0 README
  7. +76 −0 bin/pod2readme
  8. +498 −0 lib/Pod/Readme.pm
  9. +126 −0 t/10-basic.t
  10. +12 −0 t/90-fileport.t
  11. +16 −0 t/90-pod.t
  12. +16 −0 t/90-podcover.t
@@ -0,0 +1,33 @@
+use Module::Build;
+
+my $build = Module::Build->new
+ (
+ module_name => 'Pod::Readme',
+ license => 'perl',
+ requires => {
+ 'perl' => '5.005',
+ 'Carp' => 0,
+ 'File::Copy' => 0, # for pod2readme script
+ 'IO::File' => 0,
+ 'Pod::Text' => '3.0',
+ 'Regexp::Common' => 0,
+ },
+ recommends => {
+ 'Test::Pod' => '1.00', # for DEVEL_TESTS tests
+ 'Test::Pod::Coverage' => 0,
+ 'Test::Portability::Files' => 0, #
+ },
+ build_requires => {
+ 'Test::More' => 0,
+ },
+ script_files => [
+ 'bin/pod2readme',
+ ],
+ create_readme => ($Module::Build::VERSION >= 0.2702),
+ create_makefile_pl => 'traditional',
+ dist_author => 'Robert Rothenberg <rrwo at cpan.org>',
+ sign => 0,
+);
+
+$build->create_build_script;
+
@@ -0,0 +1,51 @@
+Revision history for Perl extension Pod::Readme.
+
+0.09 Sat Nov 25 2006
+ - uses Regexp::Common for URI parsing for L<> tag
+ - added separate check for https, ftps, and svn URIs
+ (rt.cpan.org bugs 23585 and 23613)
+
+0.081 Sun May 7 2006
+ - released package without signature, due to Module::Signature
+ issues
+
+0.08 Mon May 1 2006
+ - head3/4 headings not recognized
+ - went back to using Pod::PlainText
+
+0.07 Sat Feb 11 2006
+ - added min version to use Pod::Text statement in source
+ - removed multiple plans from the podcover test
+
+0.06 Thu Feb 9 2006
+ - eliminated a warning about uninitialized values
+ - recognizes =head3 and =head4 headings (from Pod::Text)
+ - uses Pod::Text instead of Pod::PlainText
+ - added internal documentation
+ - added various QA tests
+ - added "test" and "tests" as a rejected format
+
+0.05 Tue Jun 7 2005
+ - pod2readme will backup an existing README file
+ - minor updates to the documentation
+
+0.04 Wed May 18 2005
+ - known other formats such as "html" are rejected
+ - added missing prereq IO::File in Build.PL
+ - added debug option
+ - typos and tweaks for documentation
+
+0.03 Sun May 8 2005
+ - added documentation to pod2readme script
+ - include file start/stop marks are now Regexps
+ - added more tests
+ - multiple readme types can be specified in a command
+
+0.02 Fri May 6 2005
+ - added tests (much needed!)
+ - fixed issue with links being changed to refer to manpages
+
+0.01 Sat Apr 30 19:22:33 2005
+ - original version; created by h2xs 1.23 with options
+ -X -v 0.01 -b 5.5.0 -n Pod::Readme -P
+
@@ -0,0 +1,12 @@
+Build.PL
+Changes
+Makefile.PL
+MANIFEST
+META.yml
+README
+bin/pod2readme
+t/10-basic.t
+t/90-fileport.t
+t/90-pod.t
+t/90-podcover.t
+lib/Pod/Readme.pm
@@ -0,0 +1,30 @@
+---
+name: Pod-Readme
+version: 0.09
+author:
+ - 'Robert Rothenberg <rrwo at cpan.org>'
+abstract: Convert POD to README file
+license: perl
+resources:
+ license: http://dev.perl.org/licenses/
+requires:
+ Carp: 0
+ File::Copy: 0
+ IO::File: 0
+ Pod::Text: 3.0
+ Regexp::Common: 0
+ perl: 5.005
+build_requires:
+ Test::More: 0
+recommends:
+ Test::Pod: 1.00
+ Test::Pod::Coverage: 0
+ Test::Portability::Files: 0
+provides:
+ Pod::Readme:
+ file: lib/Pod/Readme.pm
+ version: 0.09
+generated_by: Module::Build version 0.2805
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
@@ -0,0 +1,21 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+ 'NAME' => 'Pod::Readme',
+ 'VERSION_FROM' => 'lib/Pod/Readme.pm',
+ 'PREREQ_PM' => {
+ 'Carp' => '0',
+ 'File::Copy' => '0',
+ 'IO::File' => '0',
+ 'Pod::Text' => '3.0',
+ 'Regexp::Common' => '0',
+ 'Test::More' => '0'
+ },
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [
+ 'bin/pod2readme'
+ ],
+ 'PL_FILES' => {}
+ )
+;
@@ -0,0 +1,92 @@
+NAME
+ Pod::Readme - Convert POD to README file
+
+REQUIREMENTS
+ This module should run on Perl 5.005 or newer. The following non-core
+ modules (depending on your Perl version) are required:
+
+ Pod::PlainText
+ Test::More
+
+INSTALLATION
+ Installation can be done using the traditional Makefile.PL or the newer
+ Build.PL methods.
+
+ Using Makefile.PL:
+
+ perl Makefile.PL
+ make test
+ make install
+
+ (On Windows platforms you should use `nmake' instead.)
+
+ Using Build.PL (if you have Module::Build installed):
+
+ perl Build.PL
+ perl Build test
+ perl Build install
+
+SYNOPSIS
+ use Pod::Readme;
+ my $parser = Pod::Readme->new();
+
+ # Read POD from STDIN and write to STDOUT
+ $parser->parse_from_filehandle;
+
+ # Read POD from Module.pm and write to README
+ $parser->parse_from_file('Module.pm', 'README');
+
+DESCRIPTION
+ This module is a subclass of Pod::PlainText which provides additional
+ POD markup for generating README files.
+
+ Why should one bother with this? One can simply use
+
+ pod2text Module.pm > README
+
+ A problem with doing that is that the default pod2text converter will
+ add text to links, so that "L<Module>" is translated to "the Module
+ manpage".
+
+ Another problem is that the README includes the entirety of the module
+ documentation! Most people browsing the README file do not need all of
+ this information.
+
+ Likewise, including installation and requirement information in the
+ module documentation is not necessary either, since the module is
+ already installed.
+
+ This module allows authors to mark portions of the POD to be included
+ only in, or to be excluded from the README file. It also allows you to
+ include portions of another file (such as a separate ChangeLog).
+
+ See the module documentation for more details.
+
+REVSION HISTORY
+ Changes since the last release:
+
+ 0.09 Sat Nov 25 2006
+ - uses Regexp::Common for URI parsing for L<> tag
+ - added separate check for https, ftps, and svn URIs
+ (rt.cpan.org bugs 23585 and 23613)
+
+ A detailed history is available in the Changes file.
+
+SEE ALSO
+ See perlpod, perlpodspec and podlators.
+
+AUTHOR
+ Robert Rothenberg <rrwo at cpan.org>
+
+ Suggestions and Bug Reporting
+
+ Feedback is always welcome. Please use the CPAN Request Tracker at
+ http://rt.cpan.org to submit bug reports.
+
+LICENSE
+ Copyright (c) 2005,2006 Robert Rothenberg. All rights reserved. This
+ program is free software; you can redistribute it and/or modify it under
+ the same terms as Perl itself.
+
+ Some portions are based on Pod::PlainText 2.02.
+
@@ -0,0 +1,76 @@
+#!/usr/bin/perl
+
+use strict;
+
+use File::Copy qw( copy );
+use Pod::Readme;
+
+our $VERSION = '0.05';
+
+# TODO
+# - use Getopts::Long with better options
+# - allow for stream conversion
+# - if no input given, parse META.yml and guess
+
+my $input = shift||"";
+
+unless (-r $input) {
+ print STDERR << "USAGE";
+Cannot find input file "$input"
+Usage: pod2readme inputfile [outputfile] [type]
+USAGE
+ exit(1);
+}
+
+my $output = shift || "README";
+
+my $type = shift || lc($output);
+
+my $parser = Pod::Readme->new( readme_type => $type );
+
+if (-e $output) {
+ copy( $output, $output . ".bak" );
+}
+
+$parser->parse_from_file( $input, $output );
+
+__END__
+
+=pod
+
+=head1 NAME
+
+pod2readme - script to convert POD to README file
+
+=head1 SYNOPSIS
+
+ pod2readme lib/Some/Module.pm
+
+=head1 DESCRIPTIONS
+
+Converts POD in the specified file to a F<README> text file. If a
+second argument is given, it will use that as the output file and
+assume that is the type of file to export:
+
+ pod2readme Module.pm COPYING
+
+If need be, this can be overridden in cases where the output file
+is not the same as the type, using a third argument:
+
+ pod2readme Module.pm Module-Install.HOWTO install
+
+=head1 SEE ALSO
+
+L<Pod::Readme>
+
+=head1 AUTHOR
+
+Robert Rothenberg <rrwo at cpan.org>
+
+=head1 LICENSE
+
+Copyright (c) 2005 Robert Rothenberg. All rights reserved.
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
Oops, something went wrong.

0 comments on commit 115f98f

Please sign in to comment.