This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Need to substitute out the placeholder '$RV' for earlier perls too.
authorNicholas Clark <nick@ccl4.org>
Wed, 30 Jan 2008 12:16:35 +0000 (12:16 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 30 Jan 2008 12:16:35 +0000 (12:16 +0000)
p4raw-id: //depot/perl@33125

ext/Devel/Peek/t/Peek.t

index e62ffdf..24cac95 100644 (file)
@@ -44,7 +44,9 @@ sub do_test {
            $pattern =~ s/^ *\$IVNV *\n/
                ($] < 5.009) ? "    IV = 0\n    NV = 0\n" : '';
            /mge;
            $pattern =~ s/^ *\$IVNV *\n/
                ($] < 5.009) ? "    IV = 0\n    NV = 0\n" : '';
            /mge;
-           $pattern =~ s/\$RV/IV/g if $] >= 5.011;
+           $pattern =~ s/\$RV/
+               ($] < 5.011) ? 'RV' : 'IV';
+           /mge;
            $pattern =~ s/^ *\$NV *\n/
                ($] < 5.011) ? "    NV = 0\n" : '';
            /mge;
            $pattern =~ s/^ *\$NV *\n/
                ($] < 5.011) ? "    NV = 0\n" : '';
            /mge;