develooper Front page | perl.perl5.porters | Postings from June 2009

Re: Remove duplication of test setup.

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
June 6, 2009 04:52
Subject:
Re: Remove duplication of test setup.
Message ID:
b77c1dce0906060451j803605dm1c525f9d54d3c6b5@mail.gmail.com
2009/5/30 Sean O'Rourke <seano@cpan.org>:
> This patch addresses (most of) the first item in perltodo.pod --
> "Remove duplication of test setup" -- by adding a common %Is hash
> to test.pl ('dired-do-query-replace-regexp' deserves most of the
> credit).

Your patch is mostly wrong : it touches a lot of files that do not
require test.pl, so %Is will end up empty. Also it touches dual-life
modules (that can run tests outside of the core, and thus outside of
any test.pl).

Moreover so avoid doing a "use vars '%is'" under strictures, or an
error-prone %Is when the test is temporarily in another package, I'd
make the API to access this info a function, like setup_is().

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About