This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove two warnings (sub diag() was redefined, and implict split is
authorNicholas Clark <nick@ccl4.org>
Wed, 26 Dec 2007 17:27:15 +0000 (17:27 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 26 Dec 2007 17:27:15 +0000 (17:27 +0000)
deprecated)

p4raw-id: //depot/perl@32736

ext/B/t/concise.t

index 315e378..4055522 100644 (file)
@@ -14,7 +14,6 @@ BEGIN {
         exit 0;
     }
     require 'test.pl';         # we use runperl from 'test.pl', so can't use Test::More
-    sub diag { print "# @_\n" } # but this is still handy
 }
 
 plan tests => 156;
@@ -201,7 +200,8 @@ SKIP: {
 
        sub defd_empty {};
        ($res,$err) = render('-basic', \&defd_empty);
-       is(scalar split(/\n/, $res), 3,
+       my @lines = split(/\n/, $res);
+       is(scalar @lines, 3,
           "'sub defd_empty {}' seen as 3 liner");
 
        is(1, $res =~ /leavesub/ && $res =~ /(next|db)state/,