In perl.git, the branch smartmatch has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ae20c3aa7c1b22aa5d270fcda2d83ea1f5e96c46?hp=054b75b0acb048c615059d324b6ffff3b9bba2b3>
- Log ----------------------------------------------------------------- commit ae20c3aa7c1b22aa5d270fcda2d83ea1f5e96c46 Author: Rafael Garcia-Suarez <[email protected]> Date: Tue May 12 14:09:02 2009 +0200 Register ~~ operator overloading in its own category in %overload::ops (This category might get reused later if we manage to overload =~) ----------------------------------------------------------------------- Summary of changes: lib/overload.pm | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/overload.pm b/lib/overload.pm index da114c5..a384568 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -138,6 +138,7 @@ sub mycan { # Real can would leave stubs. iterators => '<>', filetest => "-X", dereferencing => '${} @{} %{} &{} *{}', + matching => '~~', special => 'nomethod fallback ='); use warnings::register; @@ -448,6 +449,11 @@ treated as a filename. This overload was introduced in perl 5.12. +=item * I<Matching> + +The key C<"~~"> allows you to override the smart matching used by +the switch construct. See L<feature>. + =item * I<Dereferencing> '${}', '@{}', '%{}', '&{}', '*{}'. @@ -464,7 +470,7 @@ The dereference operators must be specified explicitly they will not be passed t =item * I<Special> - "nomethod", "fallback", "=", "~~", + "nomethod", "fallback", "=". see L<SPECIAL SYMBOLS FOR C<use overload>>. @@ -489,6 +495,7 @@ A computer-readable form of the above table is available in the hash iterators => '<>', filetest => '-X', dereferencing => '${} @{} %{} &{} *{}', + matching => '~~', special => 'nomethod fallback =' =head2 Inheritance and overloading @@ -585,11 +592,6 @@ C<"nomethod"> value, and if this is missing, raises an exception. B<Note.> C<"fallback"> inheritance via @ISA is not carved in stone yet, see L<"Inheritance and overloading">. -=head2 Smart Match - -The key C<"~~"> allows you to override the smart matching used by -the switch construct. See L<feature>. - =head2 Copy Constructor The value for C<"="> is a reference to a function with three -- Perl5 Master Repository
