Permalink
Browse files

add pod webaer

  • Loading branch information...
1 parent 9ba8d22 commit d2461f53e1d464bcdc1293be01f92a6f555624c3 @jonswar committed Apr 19, 2012
Showing with 43 additions and 0 deletions.
  1. +35 −0 lib/Pod/Weaver/Section/SeeAlsoMason.pm
  2. +8 −0 weaver.ini
@@ -0,0 +1,35 @@
+package Pod::Weaver::Section::SeeAlsoPoet;
+use Moose;
+use Moose::Autobox;
+with 'Pod::Weaver::Role::Section';
+
+# Add "SEE ALSO: Poet"
+
+sub weave_section {
+ my ( $self, $document, $input ) = @_;
+
+ my $idc = $input->{pod_document}->children;
+ for ( my $i = 0 ; $i < $idc->length ; $i++ ) {
+ next unless my $para = $idc->[$i];
+ return
+ if $para->can('command')
+ && $para->command eq 'head1'
+ && $para->content eq 'SEE ALSO';
+ }
+ $document->children->push(
+ Pod::Elemental::Element::Nested->new(
+ {
+ command => 'head1',
+ content => 'SEE ALSO',
+ children => [
+ Pod::Elemental::Element::Pod5::Ordinary->new(
+ { content => "L<Poet|Poet>" }
+ ),
+ ],
+ }
+ ),
+ );
+}
+
+no Moose;
+1;
View
@@ -0,0 +1,8 @@
+[@CorePrep]
+[Generic / NAME]
+[Generic / SYNOPSIS]
+[Generic / DESCRIPTION]
+[Leftovers]
+[SeeAlsoPoet]
+[Authors]
+[Legal]

0 comments on commit d2461f5

Please sign in to comment.