Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30673/lib/Module/Build
Modified Files:
Base.pm
Log Message:
Work around a Pod::Text 3.01 bug
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.543
retrieving revision 1.544
diff -u -d -r1.543 -r1.544
--- Base.pm 23 Jan 2006 01:31:07 -0000 1.543
+++ Base.pm 23 Jan 2006 13:27:43 -0000 1.544
@@ -2702,7 +2702,24 @@
my $fh = IO::File->new('> README');
if ( defined($fh) ) {
local $^W = 0;
+ no strict "refs";
+
+ # work around bug in Pod::Text 3.01, which expects
+ # Pod::Simple::parse_file to take input and output filehandles
+ # when it actually only takes an input filehandle
+
+ my $old_parse_file;
+ $old_parse_file = \&{"Pod::Simple::parse_file"}
+ and
+ local *{"Pod::Simple::parse_file"} = sub {
+ my $self = shift;
+ $self->output_fh($_[1]) if $_[1];
+ $self->$old_parse_file($_[0]);
+ }
+ if $Pod::Text::VERSION == 3.01;
+
Pod::Text::pod2text( $docfile, $fh );
+
$fh->close;
} else {
$self->log_warn(
@@ -2713,7 +2730,6 @@
} else {
$self->log_warn("Can't load Pod::Readme or Pod::Text to create README\n");
return;
-
}
$self->_add_to_manifest('MANIFEST', 'README');
|