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