in reply to Re^2: Undefined regexp objects?
in thread Undefined regexp objects?

... rebless the object into a different package and it keeps it's Regexp nature

Not really. The Regexp nature will disappear, you bless away that. What won't disappear is the fact that the blessed thingy is a MG, i.e. magical. But the Regexp nature will disappear. For instance, you can no longer interpolate the pattern since the string overloading was done by Regexp. So /$re /x won't work the intended way. Note that for /$re/ no interpolation is done, so that still works as expected.

ihb

Replies are listed 'Best First'.
Re: Re: Re^2: Undefined regexp objects?
by ysth (Canon) on Nov 19, 2003 at 23:31 UTC
    reblessed qr// will work as of 5.8.1.