From d4b87e753f3c5c8123aeebb4ae822cef9f2eed3c Mon Sep 17 00:00:00 2001 From: Ben Morrow Date: Tue, 27 Oct 2009 15:55:36 +0000 Subject: Implement the 'qr' overload type. If this is defined, it will be called instead of stringification whenever an object is used as a regexp or interpolated into a regexp. This will fall back to stringification even without C 1>, for compatibility. An overloaded 'qr' must return either a REGEXP or a ref to a REGEXP (such as created by qr//). Any further overloading on the return value will be ignored. --- gv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gv.c') diff --git a/gv.c b/gv.c index 22af274c2f..3e225bc270 100644 --- a/gv.c +++ b/gv.c @@ -1963,6 +1963,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) case int_amg: case iter_amg: /* XXXX Eventually should do to_gv. */ case ftest_amg: /* XXXX Eventually should do to_gv. */ + case regexp_amg: /* FAIL safe */ return NULL; /* Delegate operation to standard mechanisms. */ break; -- cgit v1.2.1