in reply to Re: (tye)Re: How to view contents of a blessed Regular Expression?
in thread How to view contents of a blessed Regular Expression?

Well, as I thought, this is beyond my grasp right now. I think I'm getting too bogged down in the details. I'll bookmark this node and come back to it in a couple months.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks

  • Comment on Re: Re: (tye)Re: How to view contents of a blessed Regular Expression?

Replies are listed 'Best First'.
Re: Re: Re: (tye)Re: How to view contents of a blessed Regular Expression?
by ysth (Canon) on Nov 20, 2003 at 00:03 UTC
    Regex's stringify overload isn't a regular overload via overload.pm, its a block of code in perl's main stringify routine: sv.c:sv_2pv_flags(). This explicitly checks for a package name of Regex up through perl 5.8.0, so having your new regex class be a subclass of Regex does nothing (except make isa("Regex") checks work. For 5.8.1 and later, the needless package name check is omitted, so reblessed regexes should Just Work.