summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-07-13 12:56:58 +0200
committermkanat%kerio.com <>2005-07-13 12:56:58 +0200
commitf1923f8e85501143d0be63d872c726159440f6c1 (patch)
tree0eee13f099d9f79f5072acaca60ded9293402e00 /checksetup.pl
parent4b29000946fb102e2db7d8ac5c6c502c03387de1 (diff)
downloadbugzilla-f1923f8e85501143d0be63d872c726159440f6c1.tar.gz
bugzilla-f1923f8e85501143d0be63d872c726159440f6c1.tar.xz
Bug 300336: Bugzilla::Auth should not contain any exported subroutines
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl17
1 files changed, 7 insertions, 10 deletions
diff --git a/checksetup.pl b/checksetup.pl
index c86a2e427..3ac8eb5e3 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1414,22 +1414,19 @@ if ($^O !~ /MSWin32/i) {
# This is done here, because some modules require params to be set up, which
# won't have happened earlier.
-# The only use for loading globals.pl is for Crypt(), which should at some
-# point probably be factored out into Bugzilla::Auth::*
+# It's never safe to directly "use" a module in checksetup. If a module
+# prerequisite is missing, and you "use" a module that requires it,
+# then instead of our nice normal checksetup message the user would
+# get a cryptic perl error about the missing module.
-# XXX - bug 278792: Crypt has been moved to Bugzilla::Auth::bz_crypt.
-# This section is probably no longer needed, but we need to make sure
-# that things still work if we remove globals.pl. So that's for later.
-
-# It's safe to use Bugzilla::Auth here because parameters have now been
-# defined.
-require Bugzilla::Auth;
-import Bugzilla::Auth 'bz_crypt';
+# So, we always wrap our "use" statements in checksetup in a string eval.
# This is done so we can add new settings as developers need them.
require Bugzilla::User::Setting;
import Bugzilla::User::Setting qw(add_setting);
+eval("use Bugzilla:Util");
+
# globals.pl clears the PATH, but File::Find uses Cwd::cwd() instead of
# Cwd::getcwd(), which we need to do because `pwd` isn't in the path - see
# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-09/msg00115.html