|Keep It Simple, Stupid|
Comment onby gods
|on Feb 11, 2000 at 00:06 UTC||Need Help??|
As soon as you bless it into another package, it is no longer a precompiled regex,but a reference to an undefined scalar (Dumper isn't handling this incorrectly, the scalar actually is undef).
Er, no (although thats what I thought at first too, run the code I provided.) It still is a precompiled regex otherwise it wouldn't match as it did in my example code.
This is normal behaviour. If $object is blessed into Foo, and you re-bless it into Bar, it is no longer an object of class Foo.
The results that I got in the code I posted suggest that in fact a regex is a base type like array or hash and thus its underlying behaviour does not change as it is blessed and reblessed.
Oh and it gets weirder, there is no way using UNIVERSAL::isa() to determine if a blessed scalar ref is a regex.
Yves / DeMerphq
In reply to Re: Re: Identifying if a variable is the product of a qr//