Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #42337] [PATCH]: Configure.pl: Refactor list of steps into Parrot::Configure::Step::List

3 views
Skip to first unread message

James Keenan

unread,
Apr 7, 2007, 10:11:19 PM4/7/07
to bugs-bi...@rt.perl.org
# New Ticket Created by James Keenan
# Please include the string: [perl #42337]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42337 >


This patch transfers one aspect of Configure.pl's functionality --
its listing of the steps in the configurati0n process -- out of that
script and places it in a new package:
lib/Parrot/Configure/Step/List.pm.

Parrot::Configure::Step::List exports a single subroutine on demand:
get_steps_list().

By placing this functionality in a subroutine exported by a class, we
can write tests for it using Perl's standard testing apparatus.
Accordingly, a test file is supplied as part of this patch:
t/configure/03-steplist.t

This is the third in a series of patches a number of Parrot hackers
and I have submitted which refactor Configure.pl and the various
Parrot::Configure::* classes. This refactoring is focused primarily
on increasing the testability -- and, by extension, the long-term
maintainability -- of Parrot's configuration code.

Assuming that our refactoring is correct, the end result of the
configuration process should not change in the least. (To confirm,
do a 'diff' on lib/Parrot/Config/Generated.pm versus an unpatched
version.) However, if in the future you are proposing revisions to
functionality originally found in Configure.pl (e.g., adding a new
configuration step), you may have to look in a new place to make such
a revision.

Assuming no objection, I will apply this patch to trunk in
approximately three days. Thank you very much.

kid51


configure.step.patch.txt

James Keenan via RT

unread,
Apr 11, 2007, 8:35:40 PM4/11/07
to perl6-i...@perl.org
Patches applied; closing ticket.

James Keenan via RT

unread,
Apr 11, 2007, 8:35:01 PM4/11/07
to perl6-i...@perl.org
Applied to trunk in r18157

Also, in r18158 applied some small changes in docs/configuration.pod to point to
Parrot::Configure::Step::List as new location for list of configuration steps used in Configure.pl.

0 new messages