From d15c41c6916aa127a3099a09f592b05d418189b1 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 4 Jul 2006 04:42:45 +0000 Subject: Bug 338375: Use Bugzilla->params everywhere instead of Param(). Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- Bugzilla/Config.pm | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'Bugzilla/Config.pm') diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index c4a23f9cb..57c60dbb0 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -35,9 +35,6 @@ use strict; use base qw(Exporter); use Bugzilla::Constants; -# Module stuff -@Bugzilla::Config::EXPORT = qw(Param); - # Don't export localvars by default - people should have to explicitly # ask for it, as a (probably futile) attempt to stop code using it # when it shouldn't @@ -92,28 +89,6 @@ sub param_panels { return @param_panels; } -sub Param { - my ($param) = @_; - - _load_params unless %params; - my %param_values = %{Bugzilla->params}; - - # By this stage, the param must be in the hash - die "Can't find param named $param" unless (exists $params{$param}); - - # When module startup code runs (which is does even via -c, when using - # |use|), we may try to grab params which don't exist yet. This affects - # tests, so have this as a fallback for the -c case - return $params{$param}->{default} - if ($^C && not exists $param_values{$param}); - - # If we have a value for the param, return it - return $param_values{$param} if exists $param_values{$param}; - - # Else error out - die "No value for param $param (try running checksetup.pl again)"; -} - sub SetParam { my ($name, $value) = @_; @@ -277,11 +252,6 @@ Bugzilla::Config - Configuration parameters for Bugzilla =head1 SYNOPSIS - # Getting parameters - use Bugzilla::Config; - - my $fooSetting = Bugzilla->params->{'foo'}; - # Administration functions use Bugzilla::Config qw(:admin); @@ -305,11 +275,6 @@ Parameters can be set, retrieved, and updated. =over 4 -=item Cparams->{$name}> - -Returns the Param with the specified name. Either a string, or, in the case -of multiple-choice parameters, an array reference. - =item C Sets the param named $name to $value. Values are checked using the checker -- cgit v1.2.3-24-g4f1b