Skip Menu |

This queue is for tickets about the Carp-Parse-Redact CPAN distribution.

Report information
The Basics
Id: 79891
Status: resolved
Priority: 0/
Queue: Carp-Parse-Redact

People
Owner: Nobody in particular
Requestors: AUBERTG [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Kate, I pushed the branch RT_79891 to the repository, please let me know what you think... Thank you, Guillaume $ prove -I lib -r t/ t/00-load.t .......................................................... 1/1 # Carp::Parse::Redact 1.1.3, Perl 5.014002, /usr/bin/perl t/00-load.t .......................................................... ok t/10-parse_stack_trace.t ............................................. ok t/11-parse_stack_trace-regexp.t ...................................... ok t/12-parse_stack_trace-indentation.t ................................. ok t/CallerInformation-Redacted/00-load.t ............................... 1/1 # Carp::Parse::CallerInformation::Redacted 1.1.3, Perl 5.014002, /usr/bin/perl t/CallerInformation-Redacted/00-load.t ............................... ok t/CallerInformation-Redacted/10-new.t ................................ ok t/CallerInformation-Redacted/20-get_line.t ........................... ok t/CallerInformation-Redacted/30-get_arguments_string.t ............... ok t/CallerInformation-Redacted/40-get_arguments_list.t ................. ok t/CallerInformation-Redacted/45-get_redacted_arguments_list.t ........ ok t/CallerInformation-Redacted/50-get_redacted_line.t .................. ok t/CallerInformation-Redacted/51-get_redacted_line-single_argument.t .. ok t/manifest.t ......................................................... ok t/module_versions.t .................................................. ok t/perlcritic.t ....................................................... ok t/pod-coverage.t ..................................................... ok t/pod.t .............................................................. ok All tests successful. Files=17, Tests=33, 3 wallclock secs ( 0.14 usr 0.03 sys + 2.12 cusr 0.20 csys = 2.49 CPU) Result: PASS
Patch accepted, fixed in 1.1.4.