Closed
Bug 1153125
Opened 11 years ago
Closed 11 years ago
bug 1051056 causes "Constant subroutine redefined" warnings during t/001compile.t
Categories
(Bugzilla :: WebService, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 6.0
People
(Reporter: glob, Assigned: dkl)
References
Details
(Whiteboard: [bmo-backport])
Attachments
(1 file)
|
5.31 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
bug 1051056 causes "Constant subroutine redefined" warnings during t/001compile.t:
t/001compile.t ....... 68/231 Constant subroutine main::WS_ERROR_CODE redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_OK redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_CREATED redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_ACCEPTED redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_NO_CONTENT redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_MULTIPLE_CHOICES redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_BAD_REQUEST redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_NOT_FOUND redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::STATUS_GONE redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Subroutine main::REST_STATUS_CODE_MAP redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::ERROR_UNKNOWN_FATAL redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::ERROR_UNKNOWN_TRANSIENT redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Subroutine main::REST_CONTENT_TYPE_WHITELIST redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
Constant subroutine main::API_AUTH_HEADERS redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66, <DATA> line 751.
at t/001compile.t line 39.
t/001compile.t ....... ok
Updated•11 years ago
|
Target Milestone: --- → Bugzilla 6.0
Version: unspecified → 5.1
Comment 1•11 years ago
|
||
Why are constants defined twice in Bugzilla::WebService::Constants and in Bugzilla::API::1_0::Constants?
First of all, Bugzilla::Error is the only module using WS_ERROR_CODE, but it loads Bugzilla::WebService::Constants. So it looks like Bugzilla::API::1_0::Constants will always be ignored (not sure which module takes precedence in this case).
Also, Bugzilla::WebService::Constants is full of REST-specific constants. So aren't they supposed to go away as they are already defined in Bugzilla::API::1_0::Constants?
| Assignee | ||
Comment 2•11 years ago
|
||
This is due to the fact that t/001compile.t attempts to load all modules one after the other where Bugzilla::API::1_0::Constants is normally only accessed via Bugzilla->api_server->constants.
Once we fully remove Bugzilla/WebService/* this will not be an issue any longer but I have this patch which will fix the warnings in the meantime.
dkl
Comment 3•11 years ago
|
||
Comment on attachment 8591082 [details] [diff] [review]
1153125_1.patch
r=LpSolit
Attachment #8591082 -
Flags: review?(LpSolit) → review+
Updated•11 years ago
|
Flags: approval?
| Assignee | ||
Comment 4•11 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
7d0c10e..d6c2d37 master -> master
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [bmo-backport]
You need to log in
before you can comment on or make changes to this bug.
Description
•