Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday January 26, 2005
10:19 PM

An embarrassing non-bug

[ #22903 ]

chromatic submitted a nifty patch to collect better test result information in Test::Harness::Straps. I had some trouble with it so I played with it a bit. This little snippet worked:

# $result number is never zero if set, so this is OK
elsif (!$result{number} and my $extra = $self->_is_extra_line( $line )) {
                                       # But this isn't!
                                       # what $result{number}?
        my $test         = $totals->{details}[$result{number} - 1];
        $test->{extra} ||=  '';
        $test->{extra}  .= $extra;
        $type = 'other';
    }

It worked when it shouldn't have. You see, $result{number} was undefined. However, the $totals->{details} array was ordered and this snippet always affected the very last element of the array . . .

:)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.