[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Restructuring check scripts



Raphael Geissert <geissert@debian.org> writes:
> Russ Allbery wrote:

>> More that you can get rid of the object completely and just do the
>> direct sub calls that the run method was doing, I think (although it's
>> been a while since the thread, and I should have responded right away
>> so that I remember what I was thinking).

> Ah, you mean to treat them like static methods?

Yeah.  There really isn't an object, currently, underneath any of the
checks.  We could make each check its own object, but I'm not sure we're
gaining anything by doing so compared to just making available to it the
objects that it might need as parameters.

> Do you know how Test::Class works?
> I don't fully understand how the 'sub name : Something' part is implemented.
> A similar approach could be used in Lintian, to make the code even more
> flexible and easier to understand.

I don't -- I've never looked at it.  It's one of those things that showed
up after I stopped closely tracking Perl development, so I'm a little bit
behind the times on things like annotations.

>> Also, whenever there are problems, it's a lot easier to track them down
>> if the tests are run in the same order for us as they are for the
>> person reporting a problem.

> Of course :) (unless there's a --predictable option ;-)

Yeah, we could do it that way.  :)  I would expect the sort to be a fairly
small part of the running time, though.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: