This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
overload.pm: Add string-specific bitops
authorFather Chrysostomos <sprout@cpan.org>
Mon, 5 Jan 2015 00:57:41 +0000 (16:57 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Feb 2015 06:03:52 +0000 (22:03 -0800)
lib/overload.pm

index dc37380..73c8202 100644 (file)
@@ -8,8 +8,8 @@ our $VERSION = '1.24';
     num_comparison      => "< <= >  >= == !=",
     '3way_comparison'   => "<=> cmp",
     str_comparison      => "lt le gt ge eq ne",
-    binary              => '& &= | |= ^ ^=',
-    unary               => "neg ! ~",
+    binary              => '& &= | |= ^ ^= &. &.= |. |.= ^. ^.=',
+    unary               => "neg ! ~ ~.",
     mutators            => '++ --',
     func                => "atan2 cos sin exp abs log sqrt int",
     conversion          => 'bool "" 0+ qr',
@@ -361,8 +361,8 @@ hash C<%overload::ops>:
  num_comparison          => '< <= > >= == !=',
  '3way_comparison'=> '<=> cmp',
  str_comparison          => 'lt le gt ge eq ne',
- binary                  => '& &= | |= ^ ^=',
- unary           => 'neg ! ~',
+ binary                  => '& &= | |= ^ ^= &. &.= |. |.= ^. ^.=',
+ unary           => 'neg ! ~ ~.',
  mutators        => '++ --',
  func            => 'atan2 cos sin exp abs log sqrt int',
  conversion      => 'bool "" 0+ qr',