in reply to Son of the Bride of Walks like a regex, quacks like a regex...
in thread Walks like a regex, quacks like a regex...

In the years since I've written this node, UNIVERSAL::isa has been published. Use that instead.


In that case you should use isa() and test for 'Regex'. You'll allow for blessed regexen this way. Simple ref() tests don't account for that.

*isa = \&UNIVERSAL::isa; sub regex_tester { my $thingie = shift; return isa( $thingie, 'Regex' ); }
  • Comment on Re: Son of the Bride of Walks like a regex, quacks like a regex...
  • Download Code