This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/B/t/OptreeCheck.pm: fix hint stripping
authorDavid Mitchell <davem@iabyn.com>
Mon, 5 Nov 2012 13:54:51 +0000 (13:54 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 10 Nov 2012 13:39:34 +0000 (13:39 +0000)
The code that strips hints from a nextstate couldn't handle
the 'next' pointer being '-', e.g. v:>,<,% ->-

ext/B/t/OptreeCheck.pm

index 18552f0..4552313 100644 (file)
@@ -693,7 +693,7 @@ sub mkCheckRex {
                )
                (?:(:>,<,%,\\{)         # hints when open.pm is in force
                   |(:>,<,%))           # (two variations)
-               (\ ->[0-9a-z]+)?
+               (\ ->(?:-|[0-9a-z]+))?
                $
               ]
        [$1 . ($2 && ':{') . $4]xegm;   # change to the hints without open.pm