Permalink
Browse files

initial commit

  • Loading branch information...
Marcel Gruenauer
Marcel Gruenauer committed Sep 3, 2010
0 parents commit 1462c81d04303897f5ffe5f53d3acea20f8bb385
Showing with 71 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 Changes
  3. +7 −0 dist.ini
  4. +59 −0 lib/Pod/Weaver/Section/BugsAndLimitations.pm
@@ -0,0 +1 @@
+Pod-Weaver-Section-BugsAndLimitations-*
@@ -0,0 +1,4 @@
+Revision history for Perl extension {{$dist->name}}
+
+{{$NEXT}}
+ - separated from Pod-Weaver-PluginBundle-MARCEL
@@ -0,0 +1,7 @@
+name = Pod-Weaver-Section-BugsAndLimitations
+copyright_year = 2010
+
+[@MARCEL]
+
+[Prereq]
+Dist::Zilla::Plugin::Bugtracker = 0
@@ -0,0 +1,59 @@
+use 5.008;
+use strict;
+use warnings;
+
+package Pod::Weaver::Section::BugsAndLimitations;
+
+# ABSTRACT: Add a BUGS AND LIMITATIONS pod section
+use Moose;
+with 'Pod::Weaver::Role::Section';
+use namespace::autoclean;
+use Moose::Autobox;
+
+sub weave_section {
+ my ($self, $document, $input) = @_;
+ my $bugtracker = $input->{zilla}->distmeta->{resources}{bugtracker}{url}
+ || 'http://rt.cpan.org';
+ $document->children->push(
+ Pod::Elemental::Element::Nested->new(
+ { command => 'head1',
+ content => 'BUGS AND LIMITATIONS',
+ children => [
+ Pod::Elemental::Element::Pod5::Ordinary->new(
+ { content => <<EOPOD,
+No bugs have been reported.
+
+Please report any bugs or feature requests through the web interface at
+L<$bugtracker>.
+EOPOD
+ }
+ ),
+ ],
+ }
+ ),
+ );
+}
+1;
+
+=begin :prelude
+
+=for test_synopsis
+1;
+__END__
+
+=end :prelude
+
+=head1 SYNOPSIS
+
+In C<weaver.ini>:
+
+ [BugsAndLimitations]
+
+=head1 OVERVIEW
+
+This section plugin will produce a hunk of Pod that refers to the bugtracker
+URL.
+
+=function weave_section
+
+adds the C<BUGS AND LIMITATIONS> section.

0 comments on commit 1462c81

Please sign in to comment.