diff options
author | Adriano Ferreira <a.r.ferreira@gmail.com> | 2006-11-23 15:43:12 -0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-24 15:03:55 +0000 |
commit | 6dd857431f51e510fbff1fc7f983b04624551018 (patch) | |
tree | a6955350025ed5f5d58ef733f52da952c2022c0a /lib/overload.pm | |
parent | 150d06de2e4cba0da08555d83988a89acd541d70 (diff) | |
download | perl-6dd857431f51e510fbff1fc7f983b04624551018.tar.gz |
[perl #36689] &=, |= and ^= overloads are nbot documented
From: "Adriano Rodrigues" <a.r.ferreira@gmail.com>
Message-ID: <73ddeb6c0611231143y1e3461dbqf30f5fce16698b5c@mail.gmail.com>
p4raw-id: //depot/perl@29373
Diffstat (limited to 'lib/overload.pm')
-rw-r--r-- | lib/overload.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index 690be22175..1ca22b481e 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -117,7 +117,7 @@ sub mycan { # Real can would leave stubs. num_comparison => "< <= > >= == !=", '3way_comparison'=> "<=> cmp", str_comparison => "lt le gt ge eq ne", - binary => "& | ^", + binary => '& &= | |= ^ ^=', unary => "neg ! ~", mutators => '++ --', func => "atan2 cos sin exp abs log sqrt int", @@ -350,13 +350,17 @@ arrays, C<cmp> is used to compare values subject to C<use overload>. =item * I<Bit operations> - "&", "^", "|", "neg", "!", "~", + "&", "&=", "^", "^=", "|", "|=", "neg", "!", "~", C<neg> stands for unary minus. If the method for C<neg> is not specified, it can be autogenerated using the method for subtraction. If the method for C<!> is not specified, it can be autogenerated using the methods for C<bool>, or C<"">, or C<0+>. +The same remarks in L<"Arithmetic operations"> about +assignment-variants and autogeneration apply for +bit operations C<"&">, C<"^">, and C<"|"> as well. + =item * I<Increment and decrement> "++", "--", @@ -437,7 +441,7 @@ A computer-readable form of the above table is available in the hash num_comparison => '< <= > >= == !=', '3way_comparison'=> '<=> cmp', str_comparison => 'lt le gt ge eq ne', - binary => '& | ^', + binary => '& &= | |= ^ ^=', unary => 'neg ! ~', mutators => '++ --', func => 'atan2 cos sin exp abs log sqrt', |