develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #117937] Deprecation warnings in Data::Dumper t/indent.t

From:
Father Chrysostomos via RT
Date:
July 7, 2013 01:02
Subject:
[perl #117937] Deprecation warnings in Data::Dumper t/indent.t
Message ID:
rt-3.6.HEAD-2552-1373158952-925.117937-15-0@perl.org
On Sun May 12 22:13:11 2013, smueller@cpan.org wrote:
> On 05/13/2013 02:25 AM, James E Keenan via RT wrote:
> > On Thu May 09 21:29:24 2013, dmacks wrote:
> >> Use of implicit split to @_ is deprecated at t/indent.t line 100.
> >> Use of implicit split to @_ is deprecated at t/indent.t line 101.
> 
> >> is(scalar(split("\n" => $dumpstr{ar_indent_2})) + 2,
> >> ��� scalar(split("\n" => $dumpstr{ar_indent_3})),
> >> ��� "Indent(3) runs 2 lines longer than Indent(2)");
> 
> [snip]
> 
> >> is(scalar($dumpstr{ar_indent_2} =~ tr/\n/\n/) + 2,
> >> ��� scalar($dumpstr{ar_indent_3} =~ tr/\n/\n/),
> >> ��� "Indent(3) runs 2 lines longer than Indent(2)");
> 
> > IIRC, this test was added to cover part of the specification for
> > $Data::Dumper::Indent.  I'm not wedded to any particular implementation
> > of the test, so long as coverage remains the same.
> >
> > cc-ing the maintainer:  Steffen, what would you recommend?
> 
> I really don't mind whichever way this is implemented. Does tr/\n/\n/ do 
> the right thing if \n represents more than one character, though?

I just suppressed the warning in commit f6b735321.  This is my reasoning:

• The warning only occurs before 5.12; the code is fine in
  later versions.
• By not changing the code I avoid the risk of sabotaging the test.
• By suppressing the warning conditionally based on perl version, we
  will still see future deprecations.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117937



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About