Grokbase Groups Perl qa October 2005
Hi Michael!

Thanks for your commentary.
On Monday 10 October 2005 23:27, Michael G Schwern wrote:
On Mon, Oct 10, 2005 at 10:53:34PM +0200, Shlomi Fish wrote:
Let me know what you think.
$ perl -Ilib -wle 'use Test::Shlomif::Harness::Obj;
Test::Shlomif::Harness::Obj->new->runtests(test_files => \@ARGV)' t/*.t
Can't use an undefined value as an ARRAY reference at
lib/Test/Shlomif/Harness/ line 715.

runtests() is not doing anything with its arguments and neither is
_run_all_tests() so $self->test_files is undefined.
It was a documentation problem. The current syntax is:

my $tester = Test::Shlomif::Harness::Obj->new(
'test_files' => \@ARGV,
In fact, there's a
few places where you code waffles between getting information from the
object and from its arguments.  _leader_width, for example, gets its
test_files from its arguments even though it should be available on the
Yes, I initially thought it might be a good idea to make it able to calculate
the width of other test file collections except its own. But since it's a
private method (that has a leading underscore), then I guess I can avoid it.
Moving along, here's what happens on a simple test failure.

$ perl -Ilib -wle 'use Test::Shlomif::Harness::Obj;  $t =
Test::Shlomif::Harness::Obj->new;  $t->test_files(\@ARGV);  $t->runtests()'
t/fail.t t/fail....NOK 1 #   Failed test in t/fail.t at line 4.
# Looks like you failed 1 test of 1.
Test returned status 1 (wstat 256, 0x100)
Undefined format "STDOUT" called at lib/Test/Shlomif/Harness/ line

It appears all that nasty format code that we hate in Test::Harness has
gone missing yet _fail_other() still tries to use it.
Fixed now. I first restored the formats, then gradually refactored the code to
eliminate them.

Available now as:
The way you've broken down the nattier bits of Test::Harness, such as
_show_results(), into digestable functions has value.
I'd like to see
that sort of thing as patches to Test::Harness rather than in a fork.
Well, I started with Test::Harness and gradually revamped it. The problem is
that some aspects of the T::H interface suck, and I had to change the
interface in a non-backwards-compatible way.

Thanks again.


Shlomi Fish
Also using an object *internally* makes sense.  Cleans up having to pass
%tot and %test around all over.  An external object interface will require
a lot more thought.

Michael G Schwern
Ahh email, my old friend.  Do you know that revenge is a dish that is best
served cold?  And it is very cold on the Internet!

Shlomi Fish

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 15 of 18 | next ›
Discussion Overview
groupqa @
postedOct 10, '05 at 8:57p
activeNov 6, '05 at 3:15p



site design / logo © 2021 Grokbase