From db620012e3c21bdb5f2ed962b3d3526ba337f721 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 6 Jan 2013 22:50:54 -0700 Subject: [PATCH 1/1] Create new warnings category experimental::regex_sets This on-by-default warning will be raised upon use of the soon-to-be-delivered regex sets feature. The syntax used is currently invalid, so no feature activation is necessary. The purpose of this warning is to make sure that any user is properly notified that this feature is experimental and subject to change --- lib/warnings.pm | 17 ++++++++++------- regen/warnings.pl | 4 +++- warnings.h | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/warnings.pm b/lib/warnings.pm index 2c47a71..5777723 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -5,7 +5,7 @@ package warnings; -our $VERSION = '1.15'; +our $VERSION = '1.16'; # Verify that we're called correctly so that warnings will work. # see also strict.pm. @@ -230,10 +230,11 @@ our %Offsets = ( 'experimental' => 102, 'experimental::lexical_subs'=> 104, + 'experimental::regex_sets'=> 106, ); our %Bits = ( - 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x01", # [0..52] + 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05", # [0..53] 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [29] 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [30] 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] @@ -243,8 +244,9 @@ our %Bits = ( 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [31] 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x01", # [51,52] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x05", # [51..53] 'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [52] + 'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [53] 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [47] 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [46] @@ -289,7 +291,7 @@ our %Bits = ( ); our %DeadBits = ( - 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x02", # [0..52] + 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x0a", # [0..53] 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [29] 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [30] 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] @@ -299,8 +301,9 @@ our %DeadBits = ( 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [31] 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02", # [51,52] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x0a", # [51..53] 'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [52] + 'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [53] 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [47] 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [46] @@ -345,8 +348,8 @@ our %DeadBits = ( ); $NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -$DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x01", # [2,52,4,22,23,25] -$LAST_BIT = 106 ; +$DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x05", # [2,52,53,4,22,23,25] +$LAST_BIT = 108 ; $BYTES = 14 ; $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ; diff --git a/regen/warnings.pl b/regen/warnings.pl index e99ff4b..e0f3583 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -87,6 +87,8 @@ my $tree = { 'experimental' => [ 5.017, { 'experimental::lexical_subs' => [ 5.017, DEFAULT_ON ], + 'experimental::regex_sets' => + [ 5.017, DEFAULT_ON ], }], #'default' => [ 5.008, DEFAULT_ON ], @@ -437,7 +439,7 @@ read_only_bottom_close_and_rename($pm); __END__ package warnings; -our $VERSION = '1.15'; +our $VERSION = '1.16'; # Verify that we're called correctly so that warnings will work. # see also strict.pm. diff --git a/warnings.h b/warnings.h index 974f451..3133df0 100644 --- a/warnings.h +++ b/warnings.h @@ -91,6 +91,7 @@ #define WARN_EXPERIMENTAL 51 #define WARN_EXPERIMENTAL__LEXICAL_SUBS 52 +#define WARN_EXPERIMENTAL__REGEX_SETS 53 #define WARNsize 14 #define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125" -- 1.8.3.1