Skip Menu |

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

Report information
The Basics
Id: 75079
Status: resolved
Priority: 0/
Queue: Pod-Cpandoc

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

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'not found' message should indicate that cpan was searched.
After searching CPAN and not finding a module, the message should indicate that CPAN was searched, instead of being the exact same message that perldoc returns. The attached patch gives a clearer message.
Subject: 0001-new-message-when-documentation-not-found.patch
--- lib/Pod/Cpandoc.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Pod/Cpandoc.pm b/lib/Pod/Cpandoc.pm index 6e7ebb3..9514ed5 100644 --- a/lib/Pod/Cpandoc.pm +++ b/lib/Pod/Cpandoc.pm @@ -64,7 +64,9 @@ sub scrape_documentation_for { else { $content = $self->query_live_cpan_for($module); } - return if !defined($content); + if (!defined($content)) { + die "No documentation found for $module either locally or on CPAN\n"; + } $module =~ s{.*/}{}; # directories and/or URLs with slashes anger File::Temp $module =~ s/::/-/g; @@ -206,4 +208,3 @@ Copyright 2011 Shawn M Moore. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut - -- 1.7.9
Subject: Re: [rt.cpan.org #75079] 'not found' message should indicate that cpan was searched.
Date: Thu, 16 Feb 2012 21:58:23 -0500
To: bug-Pod-Cpandoc [...] rt.cpan.org
From: Shawn M Moore <sartak [...] gmail.com>
Wes Sheldahl via RT wrote: Show quoted text
> After searching CPAN and not finding a module, the message should indicate that CPAN was > searched, instead of being the exact same message that perldoc returns. The attached patch > gives a clearer message.
I find setting the environment variable CPANDOC_FETCH to 1 suffices for me. Have you tried that? Shawn
On Thu Feb 16 21:58:39 2012, SARTAK wrote: Show quoted text
> I find setting the environment variable CPANDOC_FETCH to 1 suffices > for me. Have you tried that? > > Shawn
No, I hadn't tried that. Setting that environment variable does seem to serve the same purpose. Thanks. Incidentally, I'm finding this tool to be a great way to skim the docs of different modules, and faster than either installing the modules or looking them up in a browser. Wes
CPANDOC_FETCH=1 seems to be good enough :)