Skip Menu |

This queue is for tickets about the Pod-Perldoc CPAN distribution.

Report information
The Basics
Id: 75815
Status: resolved
Priority: 0/
Queue: Pod-Perldoc

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.15_15
Fixed in: (no value)



Subject: "perldoc" without arguments emits unhelpful error
At present, if I run just "perldoc" I get this: Can't locate object method "debug" via package "Pod::Perldoc" at /Users/rjbs/perl5/perlbrew/perls/15.8/lib/5.15.8/Pod/Perldoc.pm line 315. This must be fixed before 5.16.0 ships! I can look at patching it, but I'm hoping you can sort it out without me having to look at any source. :) Let me know if you've got the time/tuits. Thanks! -- rjbs
The missing method comes from Pod::Perldoc::BaseTo. Apparently several output methods are copied and pasted from there to Pod::Perldoc, so the obvious cargo-cult patch below solves the problem, in a rather inelegant way : diff --git a/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm b/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm index 3de1cd6..d230feb 100644 --- a/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm +++ b/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm @@ -31,6 +31,18 @@ use Pod::Perldoc::GetOptsOO; # uses the DEBUG. use Carp qw(croak carp); # these are also in BaseTo, which I don't want to inherit +sub debugging { + my( $self, @messages ) = @_; + + ( defined(&Pod::Perldoc::DEBUG) and &Pod::Perldoc::DEBUG() ) + } + +sub debug { + my( $self, @messages ) = @_; + return unless $self->debugging; + print STDERR map { "DEBUG $_" } @messages; + } + sub warn { my( $self, @messages ) = @_;
I should be able to get a fix out tonight.
On Fri Mar 16 10:27:07 2012, RGARCIA wrote: Show quoted text
> The missing method comes from Pod::Perldoc::BaseTo. Apparently several > output methods are > copied and pasted from there to Pod::Perldoc, so the obvious cargo- > cult patch below solves the > problem, in a rather inelegant way :
Thanks for identifying the problem and providing a patch!
This has been fixed by applying Rafael's suggested patch. I didn't see a better way to handle it at this point.