In perl.git, the branch smoke-me/jkeenan/134441-Dumpvalue has been created
<https://perl5.git.perl.org/perl.git/commitdiff/db372bbb70bf14081d7d17c033c8f9af7c86ebfb?hp=0000000000000000000000000000000000000000>
at db372bbb70bf14081d7d17c033c8f9af7c86ebfb (commit)
- Log -----------------------------------------------------------------
commit db372bbb70bf14081d7d17c033c8f9af7c86ebfb
Author: James E Keenan <[email protected]>
Date: Thu Sep 19 23:02:54 2019 -0400
Handle undefined values correctly
As reported by Henrik Pauli in RT 134441, the documentation's claim that
$dv->dumpValue([$x, $y]);
and
$dv->dumpValues($x, $y);
was not being sustained in the case where one of the elements in the
array (or array ref) was undefined. This was due to an insufficiently
precise specification within the dumpValues() method for determining
when the value "undef\n" should be printed.
Tests for previously untested cases have been provided in
t/rt-134441-dumpvalue.t. They were not appended to t/Dumpvalue.t (as
would normally have been the case) because the tests in that file have
accreted over the years in a sub-optimal manner: changes in attributes
of the Dumpvalue object are tested but those changes are not zeroed-out
(by, e.g., use of 'local $self->{attribute} = undef')
before additional attributes are modified and tested. As a consequence,
it's difficult to determine the state of the Dumpvalue object at any
particular point and interactions between attributes cannot be ruled
out.
Package TieOut, used to capture STDOUT during testing, has been
extracted to its own file so that it can be used by all test files.
-----------------------------------------------------------------------
--
Perl5 Master Repository