[Bps-public-commit] r18550 - in Shipwright/trunk/lib/Shipwright: Backend

jesse at bestpractical.com jesse at bestpractical.com
Mon Feb 23 21:06:45 EST 2009


Author: jesse
Date: Mon Feb 23 21:06:45 2009
New Revision: 18550

Added:
   Shipwright/trunk/lib/Shipwright/Util/PatchModuleBuild.pm
Modified:
   Shipwright/trunk/lib/Shipwright/Backend/Base.pm

Log:
Added support for stopping Module::Build from writing manpages

Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Mon Feb 23 21:06:45 2009
@@ -119,11 +119,12 @@
 sub _install_clean_inc {
     my $self = shift;
     my $dir = shift;
-    my $clean_inc_path = catdir( $dir, 'inc', 'Shipwright', 'Util' );
-    mkpath $clean_inc_path;
-    copy( Module::Info->new_from_module('Shipwright::Util::CleanINC')->file,
-        $clean_inc_path )
-      or confess "copy Shipwright/Util/CleanINC.pm failed: $!";
+    my $util_inc_path = catdir( $dir, 'inc', 'Shipwright', 'Util' );
+    mkpath $util_inc_path;
+    for my $mod qw(Shipwright::Util::CleanINC Shipwright::Util::PatchModuleBuild) {
+        copy( Module::Info->new_from_module($mod)->file, $util_inc_path )
+            or confess "copy $mod failed: $!";
+    }
 }
 
 =item import

Added: Shipwright/trunk/lib/Shipwright/Util/PatchModuleBuild.pm
==============================================================================
--- (empty file)
+++ Shipwright/trunk/lib/Shipwright/Util/PatchModuleBuild.pm	Mon Feb 23 21:06:45 2009
@@ -0,0 +1,42 @@
+package Shipwright::Util::PatchModuleBuild;
+use strict;
+use warnings;
+
+sub import {
+ 
+    use Module::Build::Base;
+    no warnings qw'redefine';
+    sub Module::Build::Base::ACTION_manpages  {}
+
+}
+
+
+1;
+
+__END__
+
+=head1 NAME
+
+Shipwright::Util::PatchModuleBuild - Use this to clean @INC
+
+=head1 SYNOPSIS
+
+    use Shipwright::Util::PatchModuleBuild;
+
+=head1 DESCRIPTION
+
+This stops Module::Build from failing to (or succeeding at) generating
+man pages during installation.  It does this by replacing Module::Build::Base::ACTION_manpages 
+with a noop
+
+=head1 AUTHOR
+
+Jesse Vincent C<< <jesse at bestpractical.com> >>
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright 2007-2009 Best Practical Solutions.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+



More information about the Bps-public-commit mailing list