From: Graham Knop Date: Thu, 22 Jan 2015 01:37:58 +0000 (-0500) Subject: add new warning categories from 5.21 series X-Git-Tag: v1.999_001~1^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e139b49372a4dbd05942d512dc12e68e708eade;p=p5sagit%2Fstrictures.git add new warning categories from 5.21 series --- diff --git a/lib/strictures.pm b/lib/strictures.pm index 7392eb5..5bd43ec 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -16,12 +16,16 @@ our @WARNING_CATEGORIES = grep { exists $warnings::Offsets{$_} } qw( exiting experimental experimental::autoderef + experimental::const_attr experimental::lexical_subs experimental::lexical_topic experimental::postderef + experimental::re_strict + experimental::refaliasing experimental::regex_sets experimental::signatures experimental::smartmatch + experimental::win32_perlio glob imprecision io @@ -32,7 +36,9 @@ our @WARNING_CATEGORIES = grep { exists $warnings::Offsets{$_} } qw( pipe syscalls unopened + locale misc + missing numeric once overflow @@ -40,6 +46,7 @@ our @WARNING_CATEGORIES = grep { exists $warnings::Offsets{$_} } qw( portable recursion redefine + redundant regexp severe debugging @@ -70,6 +77,7 @@ our @WARNING_CATEGORIES = grep { exists $warnings::Offsets{$_} } qw( nonchar surrogate void + void_unusual y2k ); diff --git a/xt/all-categories.t b/xt/all-categories.t index 73156cc..784a983 100644 --- a/xt/all-categories.t +++ b/xt/all-categories.t @@ -15,7 +15,7 @@ use strictures (); # avoid loading Test::More, since it adds warning categories my %known_cats; @known_cats{@strictures::WARNING_CATEGORIES} = (); -my %core_cats; @core_cats{grep $_ ne 'all', keys %warnings::Offsets} = (); +my %core_cats; @core_cats{grep ! /^(?:all|everything|extra)$/, keys %warnings::Offsets} = (); my @missing = sort grep { !exists $known_cats{$_} } keys %core_cats; my @extra = sort grep { !exists $core_cats{$_} } keys %known_cats;