in reply to Re: Re: Re: Re: Re: Re: Code critique XS function for extracting a blessed regex's pattern.
in thread Code critique XS function for extracting a blessed regex's pattern.

return unless B::svref_2object($r)->MAGIC->TYPE =~/r/;
The object returned by svref_2object may not have a MAGIC method, so either wrap an eval {} around part of that or check that B::class(B::svref_2object($r)) eq "PVMG".
  • Comment on Re: Re: Re: Re: Re: Re: Re: Code critique XS function for extracting a blessed regex's pattern.
  • Select or Download Code