From: Ben Morrow Date: Sat, 24 Oct 2009 13:58:33 +0000 (+0100) Subject: Add a new overload type, "qr". X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d9151963660fed8e24ee268776a238e1d9ae6802;p=p5sagit%2Fp5-mst-13.2.git Add a new overload type, "qr". --- diff --git a/lib/overload/numbers.pm b/lib/overload/numbers.pm index 7c39b1c..d9daab5 100644 --- a/lib/overload/numbers.pm +++ b/lib/overload/numbers.pm @@ -81,6 +81,7 @@ our @names = qw# (.= (~~ (-X + (qr DESTROY #; @@ -152,6 +153,7 @@ our @enums = qw# concat_ass smart ftest + regexp DESTROY #; diff --git a/overload.c b/overload.c index 909a0ee..4a9c94b 100644 --- a/overload.c +++ b/overload.c @@ -83,6 +83,7 @@ static const U8 PL_AMG_namelens[NofAMmeth] = { 3, 3, 3, + 3, 7 }; @@ -159,5 +160,6 @@ static const char * const PL_AMG_names[NofAMmeth] = { "(.=", "(~~", "(-X", + "(qr", "DESTROY" }; diff --git a/overload.h b/overload.h index 1a1e69c..bbef5cb 100644 --- a/overload.h +++ b/overload.h @@ -80,6 +80,7 @@ enum { concat_ass_amg, smart_amg, ftest_amg, + regexp_amg, DESTROY_amg, max_amg_code /* Do not leave a trailing comma here. C9X allows it, C89 doesn't. */ diff --git a/overload.pl b/overload.pl index aae9e6f..d4ba9a7 100644 --- a/overload.pl +++ b/overload.pl @@ -229,5 +229,6 @@ concat (. concat_ass (.= smart (~~ ftest (-X +regexp (qr # Note: Perl_Gv_AMupdate() assumes that DESTROY is the last entry DESTROY DESTROY