[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[PATCH] v5.10.0 Pod/Text.pm Can't call method "pod2text" without a package or object
ERROR CONDITION (5.10.0)
Can't call method "pod2text" without a package or object reference
at /home/jaalto/tmp/t.pl line 12.
TEST SCRIPT
#!/usr/bin/perl
use strict;
use English;
=pod
Test POD
=cut
pod2text $PROGRAM_NAME;
PATCH TO FIX THIS
Following is rechecked[1] patch against 2008-11-03 16:38Z
rsync://ftp.linux.activestate.com/perl-current/pod
Jari
[1] Cf. 2008-09-16 http://article.gmane.org/gmane.comp.lang.perl.perl5.porters/62227/match=aalto
From 566942634ffdfa3329992479e36d6f62f5b84a44 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Mon, 3 Nov 2008 18:57:21 +0200
Subject: [PATCH] [PATCH] Pod/Text.pm: (sub output): Check undefined file descriptor
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
Text.pm | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Text.pm b/Text.pm
index 98dd434..4a51d4d 100644
--- a/Text.pm
+++ b/Text.pm
@@ -250,7 +250,14 @@ sub reformat {
sub output {
my ($self, $text) = @_;
$text =~ tr/\240\255/ /d;
- print { $$self{output_fh} } $text;
+
+ my $fd = $$self{output_fh};
+
+ if ( $fd ) {
+ print { $fd } $text;
+ } else {
+ print $text;
+ }
}
# Output a block of code (something that isn't part of the POD text). Called
--
1.6.0.2
- Follow-Ups from:
-
Michael G Schwern <schwern@pobox.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]