diff options
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 17 |
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 |