Closed
Bug 342053
Opened 18 years ago
Closed 18 years ago
Quicksearch.pm defines $cgi outside routines
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
1.06 KB,
patch
|
wicked
:
review+
|
Details | Diff | Splinter Review |
Quicksearch.pm defines "my $cgi = Bugzilla->cgi;" outside routines. This makes "perl -cwT buglist.cgi" to fail, because buglist.cgi uses Quicksearch.pm. I saw this problem a few seconds before committing my patch about the removal of versioncache. ;)
We have to fix this before committing my patch about versioncache.
Assignee | ||
Comment 1•18 years ago
|
||
move $cgi definition inside routines which use it.
Attachment #226191 -
Flags: review?(myk)
Updated•18 years ago
|
Attachment #226191 -
Flags: review?(myk) → review+
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Flags: approval?
Updated•18 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 2•18 years ago
|
||
Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v <-- Quicksearch.pm
new revision: 1.7; previous revision: 1.6
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: Quicksearch.pm defined $cgi outside routines → Quicksearch.pm defines $cgi outside routines
Comment 3•18 years ago
|
||
FWIW, it's not possible for a call to "Bugzilla->cgi" to cause a problem at compile-time -- "Bugzilla->cgi" doesn't get resolved until runtime.
If this fixed the problem, the problem was something else strange.
Assignee | ||
Comment 4•18 years ago
|
||
I think that's because Bugzilla->cgi calls Param() which loads all params, including those in BugFields.pm, despite $dbh was not yet defined. Moving
$cgi = Bugzilla->cgi inside routines prevents to load all these params at compile time. That's my theory.
Comment 5•18 years ago
|
||
Ohhh, right, because it's a .pm file. I didn't even think of that.
Yeah, of course, .pm files should never define things outside of routines, except in very unusual circumstances.
You need to log in
before you can comment on or make changes to this bug.
Description
•