diff options
author | Aaron Crane <arc@cpan.org> | 2017-07-09 14:01:54 +0100 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-07-16 13:09:32 +0100 |
commit | ad1baa5fc15cc2dfcc79d0f93ba25aeefcfd8f48 (patch) | |
tree | f744a1973050148489e1b8b1644795c8dccb5c13 | |
parent | 57ebedf650e9cdb33af623b093785c7ccef1e223 (diff) | |
download | perl-ad1baa5fc15cc2dfcc79d0f93ba25aeefcfd8f48.tar.gz |
Restore Porting/make-rmg-checklist --html option
-rw-r--r-- | Porting/make-rmg-checklist | 19 | ||||
-rw-r--r-- | Porting/release_managers_guide.pod | 6 |
2 files changed, 22 insertions, 3 deletions
diff --git a/Porting/make-rmg-checklist b/Porting/make-rmg-checklist index f116d23471..e4a810d36f 100644 --- a/Porting/make-rmg-checklist +++ b/Porting/make-rmg-checklist @@ -33,7 +33,6 @@ the following arguments: of release you want to have --html Output HTML instead of POD - (Not supported at the moment) _END_HELP exit; @@ -121,16 +120,24 @@ sub create_checklist { print "=back\n\n" x ( $over_level / 4 ); } -my ($version); +my ($version, $html); GetOptions( 'version|v=s' => \$version, - 'html' => sub { _help('HTML is not supported at the moment'); }, + 'html' => \$html, 'help|h' => sub { _help(); }, ); defined $version or _help('You must provide a version number'); +my $pod_output = ''; +if ($html) { + require Pod::Simple::HTML; + open my $fh, '>', \$pod_output + or die "Can't create fh to string: $!\n"; + select $fh; +} + my $type = _type_from_version($version); chomp( my @pod_lines = @{ pod() } ); @@ -199,3 +206,9 @@ iterate_items( \@items, $type, sub { print "=head$item->{'head'} $item->{'name'}"; print "$item->{'content'}\n"; } ); + +if ($html) { + my $simple = Pod::Simple::HTML->new; + $simple->output_fh(*STDOUT); + $simple->parse_string_document($pod_output); +} diff --git a/Porting/release_managers_guide.pod b/Porting/release_managers_guide.pod index 30e089fea1..35ac652f65 100644 --- a/Porting/release_managers_guide.pod +++ b/Porting/release_managers_guide.pod @@ -18,6 +18,12 @@ This script is run as: perl Porting/make-rmg-checklist \ --version [5.x.y-RC#] > /tmp/rmg.pod +You can also pass the C<--html> flag to generate an HTML document instead of +POD. + + perl Porting/make-rmg-checklist --html \ + --version [5.x.y-RC#] > /tmp/rmg.html + =head1 SYNOPSIS This document describes the series of tasks required - some automatic, some |