Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
61e26c13
Commit
61e26c13
authored
Feb 23, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 476607: "Constant subroutine redefined" warnings from Bugzilla::Field::Choice
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
parent
367a9694
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Choice.pm
Bugzilla/Field/Choice.pm
+6
-6
No files found.
Bugzilla/Field/Choice.pm
View file @
61e26c13
...
@@ -93,18 +93,18 @@ sub type {
...
@@ -93,18 +93,18 @@ sub type {
# For generic classes, we use a lowercase class name, so as
# For generic classes, we use a lowercase class name, so as
# not to interfere with any real subclasses we might make some day.
# not to interfere with any real subclasses we might make some day.
my
$package
=
"Bugzilla::Field::Choice::$field_name"
;
my
$package
=
"Bugzilla::Field::Choice::$field_name"
;
Bugzilla
->
request_cache
->
{
"field_$package"
}
=
$field_obj
;
#
We check defined so that the package and the stored field are only
#
This package only needs to be created once. We check if the DB_TABLE
#
created once globally (at least per request). We prefix it with
#
glob for this package already exists, which tells us whether or not
#
field_ (instead of suffixing it) so that we don't somehow conflict
#
we need to create the package (this works even under mod_perl, where
#
with the names of custom fields
.
#
this package definition will persist across requests))
.
if
(
!
defined
Bugzilla
->
request_cache
->
{
"field_$package
"
})
{
if
(
!
defined
*
{
"${package}::DB_TABLE
"
})
{
eval
<<EOC;
eval
<<EOC;
package $package;
package $package;
use base qw(Bugzilla::Field::Choice);
use base qw(Bugzilla::Field::Choice);
use constant DB_TABLE => '$field_name';
use constant DB_TABLE => '$field_name';
EOC
EOC
Bugzilla
->
request_cache
->
{
"field_$package"
}
=
$field_obj
;
}
}
return
$package
;
return
$package
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment