On Jan 22, 2006, at 4:06 PM, Yitzchak Scott-Thoennes wrote:
Patch attached. The "disadvantage" is that the pod2text call needs to
be in two places, one in scope of the local and one not. Earlier, I
had thought more lines of code needed to be duplicated.
I wonder whether the patch below would also work - it has the benefit
of only one pod2text() call. But it does the funky "local *{'foo'} =
sub {...} if bar();" construction, I'm not sure whether that's kosher.
Would it be a lot of trouble to roll out a _06 version? I haven't
been able to connect to sourceforge cvs recently, and I'd like to
put out a new patch for adding Module::Build to the core.
Yeah, I can do that in a day or two.
BTW, someone tried it on VMS and reported some problems.
See http://nntp.perl.org/group/perl.perl5.porters/108859
Yikes, that's quite spectacular. Do these same failures happen when
testing the regular CPAN package, I wonder?
-Ken
Index: lib/Module/Build/Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.543
diff -u -r1.543 Base.pm
--- lib/Module/Build/Base.pm 23 Jan 2006 01:31:07 -0000 1.543
+++ lib/Module/Build/Base.pm 23 Jan 2006 01:39:26 -0000
@@ -2702,7 +2702,21 @@
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 = \&{"Pod::Simple::parse_file"};
+ 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 +2727,6 @@
} else {
$self->log_warn("Can't load Pod::Readme or Pod::Text to create
README\n");
return;
-
}
$self->_add_to_manifest('MANIFEST', 'README');
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
|