Closed Bug 283019 Opened 20 years ago Closed 20 years ago

Stop Bugzilla::Config.pm from use-ing Bugzilla::Util

Categories

(Bugzilla :: Bugzilla-General, defect)

2.19.2
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: Wurblzap, Assigned: Wurblzap)

References

Details

Attachments

(1 file, 1 obsolete file)

There is a circular dependency between Bugzilla/Config.pm and Bugzilla/Util.pm which keeps places like Bugzilla/Error.pm from saying "use Bugzilla::Config qw(something)" -- the error message is "something is not defined in %Bugzilla::Config::EXPORT_TAGS at Bugzilla/Config.pm line 36" (note that the error occurs in Config.pm when trying to import from Error.pm).
Attached patch Patch (obsolete) — Splinter Review
Assignee: general → wurblzap
Status: NEW → ASSIGNED
Attachment #175011 - Flags: review?
Comment on attachment 175011 [details] [diff] [review] Patch No, Bugzilla::Config does actually use Bugzilla::Util. For example, at least one function uses lsearch.
Attachment #175011 - Flags: review? → review-
(In reply to comment #2) > No, Bugzilla::Config does actually use Bugzilla::Util. For example, at least > one function uses lsearch. Whoa, and here I am thinking that runtests.pl would have caught that for me...
Attached patch Patch 1.2Splinter Review
Replaced lsearch by grep. Checked for other Util.pm dependencies, too.
Attachment #175011 - Attachment is obsolete: true
Attachment #175014 - Flags: review?
Attachment #175014 - Flags: review? → review?(LpSolit)
Frédéric, regarding the parens on grep: I call these function call parentheses. If you don't see them as such, then the "when in doubt, parenthesize" axiom applies here :) [From http://aspn.activestate.com/ASPN/docs/ActivePerl/lib/Pod/perlstyle.html; see http://www.bugzilla.org/docs/developer.html]
Comment on attachment 175014 [details] [diff] [review] Patch 1.2 Ok, I have no better idea. I'm not sure parens around @{} are necessary. r=LpSolit
Attachment #175014 - Flags: review?(LpSolit) → review+
Flags: approval?
Target Milestone: --- → Bugzilla 2.20
Flags: approval? → approval+
For future reference, it's easier for me if the patches are a cvs diff (meaning -p0). :-) It's not a huge issue, though. Checking in Bugzilla/Config.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v <-- Config.pm new revision: 1.34; previous revision: 1.33 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: