Eliminate as many BEGIN blocks as possible from checksetup.pl

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Installation & Upgrading
--
enhancement
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.23
Bugzilla 3.0
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
checksetup.pl is full of BEGIN blocks. In the last few years, I've been very careful to re-structure checksetup in such a way that these BEGIN blocks should be totally unnecessary.

They originally existed because checksetup needed to check its requirements before continuing on. There were "use" statements that shouldn't have existed.

However, all those "use" statements are now "require" statements, so we should be able to eliminate almost every BEGIN block currently in checksetup.pl and still have it function properly.
(Assignee)

Comment 1

12 years ago
Created attachment 231084 [details] [diff] [review]
v1

I tested this with a perl 5.8.0 without a single module installed, and it still works perfectly. So voila, only one extremely tiny BEGIN block left, and everything is good. :-)

I found a few stray "use" statements. I moved one into its proper place (at the top of the file) and the other I made into a "require", just to be nice.
(Assignee)

Comment 2

12 years ago
Requesting approval directly, as module owner.
Status: NEW → ASSIGNED
Flags: approval?
(Assignee)

Updated

12 years ago
Blocks: 346275
Flags: approval? → approval+
(Assignee)

Comment 3

12 years ago
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.518; previous revision: 1.517
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.