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

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Bugzilla-General
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Wurblzap, Assigned: Wurblzap)

Tracking

2.19.2
Bugzilla 2.20
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.21 KB, patch
Frédéric Buclin
: review+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
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).
(Assignee)

Comment 1

14 years ago
Created attachment 175011 [details] [diff] [review]
Patch
Assignee: general → wurblzap
Status: NEW → ASSIGNED
Attachment #175011 - Flags: review?

Comment 2

14 years ago
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-
(Assignee)

Comment 3

14 years ago
(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...
(Assignee)

Comment 4

14 years ago
Created attachment 175014 [details] [diff] [review]
Patch 1.2

Replaced lsearch by grep. Checked for other Util.pm dependencies, too.
(Assignee)

Updated

14 years ago
Attachment #175011 - Attachment is obsolete: true
Attachment #175014 - Flags: review?
(Assignee)

Updated

14 years ago
Attachment #175014 - Flags: review? → review?(LpSolit)
(Assignee)

Comment 5

14 years ago
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 6

14 years ago
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+

Updated

14 years ago
Flags: approval?
Target Milestone: --- → Bugzilla 2.20
Flags: approval? → approval+

Comment 7

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.