On Mon Jan 02 02:29:40 2012, ANDK wrote:
Show quoted text
Here is a patch to work around the perl change.
(BTW, I consider this a perl bug fix.)
diff -rup String-Defer-2-yLF2Ll/t/ref.t String-Defer-2-yLF2Ll-copy/t/ref.t
--- String-Defer-2-yLF2Ll/t/ref.t 2011-11-01 15:01:31.000000000 -0700
+++ String-Defer-2-yLF2Ll-copy/t/ref.t 2012-01-02 17:56:08.000000000 -0800
@@ -50,8 +50,14 @@ sub check {
check \substr($targ, 1, 3), sub { $targ = "XfooX"; "foo" },
"\\substr()";
+ my $expect = do {
+ my $targ2 = "X";
+ my $substr = \substr $targ2, 1, 3;
+ $targ2 = "XXXXX";
+ $$substr
+ };
$targ = "X";
- check \substr($targ, 1, 3), sub { $targ = "XXXXX"; "" },
+ check \substr($targ, 1, 3), sub { $targ = "XXXXX"; $expect },
"\\substr(<outside>)";
}