I was thinking of "overloading" a function to tell if an argument was a RE vs. a string by having the user use qr// to pass the RE. So what is the result I see? The perlfunc page on
ref doesn't mention that at all on the list of built-in types. So trying
perl -e "print qr/a/"
gives a result of
Regexp, which is not terribly surprising, but then I wonder why isn't it all caps, "REGEXP", like the other built-in types?
Is the precompiled RE implemented using a class, something that the qr// operator knows about? Does this mean that Regexp (not all-capped) is reserved as a package name? Are there any interesting members in there now...?
—John