diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-06-07 21:35:17 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-06-08 10:39:22 -0600 |
commit | 3d0c6d383d001e52d4d30e6c1499ce65d6e01345 (patch) | |
tree | f8b62f80ec1df97a27317ac626328297aaecdaa2 /lib | |
parent | c71dea7f198c2197adf3e5acab87a2c35ef0c2f5 (diff) | |
download | perl-3d0c6d383d001e52d4d30e6c1499ce65d6e01345.tar.gz |
mktables: Add &= overload for Range_Lists
This is useful under the -annotate option
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 8e30f94d13..e7aa869ec6 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -4281,6 +4281,21 @@ sub trace { return main::trace(@_); } return $self->_intersect($other, 0); }, + '&=' => sub { my $self = shift; + my $other = shift; + my $reversed = shift; + + if ($reversed) { + Carp::my_carp_bug("Bad news. Can't cope with '" + . ref($other) + . ' &= ' + . ref($self) + . "'. undef returned."); + return; + } + + return $self->_intersect($other, 0); + }, '~' => "_invert", '-' => "_subtract", ; |