On Wednesday 19 July 2006 09:28, Fergal Daly wrote: > On 19/07/06, chromatic <[EMAIL PROTECTED]> wrote:
> > On Wednesday 19 July 2006 06:03, demerphq wrote: > > > sub my_ok { > > > ok($_[0],$_[1]); > > > } > > I don't know why you'd expect this to report the right line numbers; this > > code really *is* broken. > What's wrong with that code? It causes Test::Builder to report the wrong line numbers of failure and it prevents the use of test diagnostics. > It doesn't do anything useful right now > but you can't argue that a system that stops being useful when you use > subroutines is good. That's not my point. My point is that there's a one-line fix that's been around and documented since the genesis of Test::Builder. > If Test::Builder gave a stack trace rather than a single line number > then this wouldn't be broken, That's a *lot* of information to vomit for a failing test. How easily can you pick out the right call frame out of ten or more? If the person writing the subroutine adds one line of code (and this person is in the position to *know* the test level), it's not an issue. -- c