# New Ticket Created by  Timothy Bollman 
# Please include the string:  [perl #86906]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=86906 >







Location of Error:
Grammar.pm line 2158 (as of ~5:00 AM UTC on March 23): 
if +@parts != 2 {
    self.panic("Unable to find starter and stopper from '$opname'");
}


Short description of error:
self.panic isn't... panicking.


Sample code:

multi sub circumfix:<⌊⌋>($a)
{
    return $a.floor;
}
(There's no need to actually call it, the definition is enough).


Long description:
I was happily making a program that needed a floor operator.  So I figured I 
would define a circumfix floor operator using the unicode symbols.  But I 
didn't put a space between the two ends (having never created one before I was 
guessing on how to write it).  Alas, I got "Null PMC access in get_integer" 
thrown in my face.  Once I had traced it down to that space, I declared "ah! 
That's an easy enough thing to check for.  Easy patch".  A short grep later, I 
found the gen_op function in Grammar.pm and lo and behold, it was already 
checking for this error.  I put in  a debug say and it's getting to the check, 
so the logical conclusion is that the panic method isn't functioning like the 
developer expected (like perhaps it's not leaving the function).

Thanks,
-Tim

                                          

Reply via email to