]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 607083: Improve the error message that install-module.pl prints when
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 26 Oct 2010 21:08:21 +0000 (14:08 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 26 Oct 2010 21:08:21 +0000 (14:08 -0700)
you specify an invalid CPAN module.
r=mkanat, a=mkanat (module owner)

Bugzilla/Install/CPAN.pm
template/en/default/setup/strings.txt.pl

index 52f762a9a20bb1a2848232579b2fd8c4fdd6d869..bdf1d5f051901437408978099c28127be556bf3f 100644 (file)
@@ -149,6 +149,9 @@ sub install_module {
     }
 
     my $module = CPAN::Shell->expand('Module', $name);
+    if (!$module) {
+        die install_string('no_such_module', { module => $name }) . "\n";
+    }
     print install_string('install_module', 
               { module => $name, version => $module->cpan_version }) . "\n";
     if ($test) {
index eec0bd90eb4c55065970403d9d3aea4569a64129..9f8744ec46b6894cfebe6da281dfc6abae530399 100644 (file)
@@ -130,6 +130,7 @@ EOT
     module_not_found => "not found",
     module_ok => 'ok',
     module_unknown_version => "found unknown version",
+    no_such_module => "There is no Perl module on CPAN named ##module##.",
     ppm_repo_add => <<EOT,
 ***********************************************************************
 * Note For Windows Users                                              *