From f1923f8e85501143d0be63d872c726159440f6c1 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Wed, 13 Jul 2005 10:56:58 +0000 Subject: Bug 300336: Bugzilla::Auth should not contain any exported subroutines Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- checksetup.pl | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'checksetup.pl') 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 -- cgit v1.2.3-24-g4f1b