Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How can I tell if an object is based on a regex?

by demerphq (Chancellor)
on Jun 01, 2007 at 17:12 UTC ( [id://618803]=note: print w/replies, xml ) Need Help??


in reply to How can I tell if an object is based on a regex?

Long ago i had this question, and the general answer was as chromatic replied, so i wrote the code that diotalevi points out, first in Data::Dump::Streamer and later moved it to re.pm in core. However the latter is only in the blead perl version and is not yet available in a production release of Perl.

Had chromatic not vetoed my UNIVERSAL::DOES patch it would have been possible to do UNIVERSAL::DOES($rx,'qr//') but he elected to make said function/method essentially useless in the name of OO purity instead. Sad but true. Such is life in open source. :-(

---
$world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://618803]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found