# New Ticket Created by karl williamson
# Please include the string: [perl #76398]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76398 >
See attached patches
>From
275169a8df5851331669da2dd791483379c3fc5e Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@khw-desktop.(none)>
Date: Tue, 6 Jul 2010 09:20:42 -0600
Subject: [PATCH] t/lib/common.pl: localize changing $/
$/ changes should not affect callers.
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
# This code is used by lib/charnames.t, lib/feature.t, lib/subs.t,
# lib/strict.t and lib/warnings.t
+#
+# On input, $::local_tests is the number of tests in the caller; or
+# 'no_plan' if unknown, in which case it is the caller's responsibility
+# to call cur_test() to find out how many this executed
BEGIN {
require './test.pl';
close F ;
}
-undef $/;
+local $/ = undef;
-plan tests => (scalar(@prgs)-$files + ($::local_tests || 0));
+my $tests = $::local_tests || 0;
+$tests = scalar(@prgs)-$files + $tests if $tests !~ /\D/;
+plan $tests; # If input is 'no_plan', pass it on unchanged
for (@prgs){
unless (/\n/)