[dh-make-perl] 06/09: do not fail when $wnpp_query is not supplied due to --no-network
Damyan Ivanov
dmn at alioth.debian.org
Thu Aug 8 21:22:22 UTC 2013
This is an automated email from the git hooks/post-receive script.
dmn pushed a commit to branch master
in repository dh-make-perl.
commit 38d979327bbe51d04dc194b765607e975db5b56b
Author: Damyan Ivanov <dmn at debian.org>
Date: Thu Aug 8 23:04:58 2013 +0200
do not fail when $wnpp_query is not supplied due to --no-network
---
lib/Debian/Control/FromCPAN.pm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/Debian/Control/FromCPAN.pm b/lib/Debian/Control/FromCPAN.pm
index 30a835a..d5803ce 100644
--- a/lib/Debian/Control/FromCPAN.pm
+++ b/lib/Debian/Control/FromCPAN.pm
@@ -208,7 +208,10 @@ sub discover_dependencies {
$missing_debs_str
= "Needs the following modules for which there are no debian packages available:\n";
for (@$missing) {
- my $bug = ( $wnpp_query->bugs_for_package($_) )[0];
+ my $bug
+ = $wnpp_query
+ ? ( $wnpp_query->bugs_for_package($_) )[0]
+ : undef;
$missing_debs_str .= " - $_";
$missing_debs_str .= " (" . $bug->type_and_number . ')'
if $bug;
@@ -218,7 +221,10 @@ sub discover_dependencies {
else {
$missing_debs_str = "The following Perl modules are required and not installed in your system:\n";
for (@$missing) {
- my $bug = ( $wnpp_query->bugs_for_package($_) )[0];
+ my $bug
+ = $wnpp_query
+ ? ( $wnpp_query->bugs_for_package($_) )[0]
+ : undef;
$missing_debs_str .= " - $_";
$missing_debs_str .= " (" . $bug->type_and_number . ')'
if $bug;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git
More information about the Pkg-perl-cvs-commits
mailing list