Silencing the deprecated category isn't enough to quiet the warning. The syntax category would also need to be silenced. Instead, use a different way of counting the lines. --- dist/Data-Dumper/t/indent.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/Data-Dumper/t/indent.t b/dist/Data-Dumper/t/indent.t index bcfa251..ab50bac 100644 --- a/dist/Data-Dumper/t/indent.t +++ b/dist/Data-Dumper/t/indent.t @@ -98,9 +98,8 @@ like($dumpstr{ar_indent_3}, "Indent(3) annotates array elements with their indices" ); { - no if $] < 5.011, warnings => 'deprecated'; - is(scalar(split("\n" => $dumpstr{ar_indent_2})) + 2, - scalar(split("\n" => $dumpstr{ar_indent_3})), + is(scalar(() = $dumpstr{ar_indent_2} =~ /\n/g) + 2, + scalar(() = $dumpstr{ar_indent_3} =~ /\n/g), "Indent(3) runs 2 lines longer than Indent(2)"); } -- 2.9.0Thread Next