]> 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:02 +0000 (14:08 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 26 Oct 2010 21:08:02 +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 1d57b08f3aee8b34f8f04e3da19f73c383c766e3..ba3ebc0fe4fc611b3b0f8ce0e5681cec12d0a9a5 100644 (file)
@@ -147,6 +147,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 3793906cace98d343079918a3e4e3d98f57705bf..1cf399c960cccff7ff9936ae782f5cc5170dfae4 100644 (file)
@@ -150,6 +150,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                                              *