diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-04 12:55:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-04 12:55:39 +0000 |
commit | 2570cdf10e029e79aea6f367c31eb4d83b4b6f66 (patch) | |
tree | 4fb82e881410776b11df8d3de17f77c4c3f4755d /ext/re | |
parent | a7c85e4f5cc80b251f4d124c0fd790a9ddde2735 (diff) | |
download | perl-2570cdf10e029e79aea6f367c31eb4d83b4b6f66.tar.gz |
Eradicate traces of 'asciirange' re subpragma.
p4raw-id: //depot/perl@10427
Diffstat (limited to 'ext/re')
-rw-r--r-- | ext/re/re.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm index f1a4e3bc38..32cee212cc 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -98,7 +98,7 @@ sub setcolor { sub bits { my $on = shift; my $bits = 0; - unless(@_) { + unless (@_) { require Carp; Carp::carp("Useless use of \"re\" pragma"); } @@ -111,19 +111,24 @@ sub bits { uninstall() unless $on; next; } - $bits |= $bitmask{$s} || 0; + if (exists $bitmask{$s}) { + $bits |= $bitmask{$s}; + } else { + require Carp; + Carp::carp("Unknown \"re\" subpragma '$s' (known ones are: @{[join(', ', map {qq('$_')} sort keys %bitmask)]})"); + } } $bits; } sub import { shift; - $^H |= bits(1,@_); + $^H |= bits(1, @_); } sub unimport { shift; - $^H &= ~ bits(0,@_); + $^H &= ~ bits(0, @_); } 1; |