Remove "pod" build action

"./Build pod" could lead to _compile_clownfish being called twice,
resulting in a "parcel defined twice" error.

The separate "pod" action was unnecessary anyway, because it depended
on the "clownfish" action which already built the POD.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/72f441f6
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/72f441f6
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/72f441f6

Branch: refs/heads/master
Commit: 72f441f63d377a0d0114d971a8c3fe203c34847e
Parents: f041b68
Author: Nick Wellnhofer <wellnho...@aevum.de>
Authored: Mon Feb 22 18:51:54 2016 +0100
Committer: Nick Wellnhofer <wellnho...@aevum.de>
Committed: Mon Feb 22 18:51:54 2016 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/72f441f6/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm 
b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index f49c2e3..7f8a297 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -269,20 +269,10 @@ sub _compile_clownfish {
     return ( $hierarchy, $binding );
 }
 
+# Deprecated.
 sub ACTION_pod {
     my $self = shift;
     $self->depends_on('clownfish');
-    $self->_write_pod(@_);
-}
-
-sub _write_pod {
-    my ( $self, $binding ) = @_;
-    if ( !$binding ) {
-        ( undef, $binding ) = $self->_compile_clownfish;
-    }
-    print "Writing POD...\n";
-    my $pod_files = $binding->write_pod;
-    $self->add_to_cleanup($_) for @$pod_files;
 }
 
 sub ACTION_clownfish {
@@ -335,7 +325,10 @@ sub ACTION_clownfish {
         $perl_binding->write_boot;
         $perl_binding->write_hostdefs;
         $perl_binding->write_bindings;
-        $self->_write_pod($perl_binding);
+
+        print "Writing POD...\n";
+        my $pod_files = $perl_binding->write_pod;
+        $self->add_to_cleanup($_) for @$pod_files;
     }
 
     # Touch autogenerated files in case the modifications were inconsequential
@@ -648,9 +641,6 @@ For example, the file C<buildlib/My/Module/Binding.pm> 
could look like:
 =head2 clownfish
 
 Compile the Clownfish headers and generate code in the C<autogen> directory.
-
-=head2 pod
-
 Generate POD from Clownfish headers.
 
 =head1 CONSTRUCTOR

Reply via email to