Subject: | Indentation of redacted lines |
Hi Kate,
I noticed a side effect of using Data::Dump to print out the redacted
arguments: when the redacted arguments are an array, Data::Dump outputs
them on more than one line, but only the first line conserves the
indentation of the original line.
For example:
~~~~
Test at test/lib/Spock/test.t line 116
main::test_trace('username', 'yoda') called at
test/lib/Spock/test.t line 61
main::__ANON__() called at
/home/spock/site_perl/5.14.2/Try/Tiny.pm line 76
eval {...} called at /home/spock/site_perl/5.14.2/Try/Tiny.pm
line 67
Try::Tiny::try('CODE(0xb3d4f48)',
'Try::Tiny::Finally=REF(0xaf503f0)') called at test/lib/Spock/test.t line 69
~~~~
Will get redacted as:
~~~~
Test at test/lib/Spock/test.t line 116
main::test_trace(
'username',
'yoda'
) called at test/lib/Spock/test.t line 61
main::__ANON__() called at
/home/spock/site_perl/5.14.2/Try/Tiny.pm line 76
eval {...} called at /home/spock/site_perl/5.14.2/Try/Tiny.pm
line 67
Try::Tiny::try('CODE(0xb3d4f48)',
'Try::Tiny::Finally=REF(0xaf503f0)') called at test/lib/Spock/test.t line 69
~~~~
It would be nice if the indentation was preserved on all lines, to help
with readability:
~~~~
Test at test/lib/Spock/test.t line 116
main::test_trace(
'username',
'yoda'
) called at test/lib/Spock/test.t line 61
main::__ANON__() called at
/home/spock/site_perl/5.14.2/Try/Tiny.pm line 76
eval {...} called at /home/spock/site_perl/5.14.2/Try/Tiny.pm
line 67
Try::Tiny::try('CODE(0xb3d4f48)',
'Try::Tiny::Finally=REF(0xaf503f0)') called at test/lib/Spock/test.t line 69
~~~~
I will try to fix it in a branch and submit it for your consideration.
Guillaume