X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Ffields.pm;h=be2a7aedab42c02fe4adeeaed087c85cff31b564;hb=8906a23eaf1b10abd420be0a2fffed84df224b05;hp=5a84e28f2e22f2c173d4bb8afe0de181fc2b20bd;hpb=33e06c89116da420821234eb364a70b215b00a8d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/fields.pm b/lib/fields.pm index 5a84e28..be2a7ae 100644 --- a/lib/fields.pm +++ b/lib/fields.pm @@ -127,12 +127,13 @@ L =cut -use 5.005_64; +use 5.006_001; use strict; no strict 'refs'; +use warnings::register; our(%attr, $VERSION); -$VERSION = "1.01"; +$VERSION = "1.02"; # some constants sub _PUBLIC () { 1 } @@ -171,7 +172,7 @@ sub import { if ($fno and $fno != $next) { require Carp; if ($fno < $fattr->[0]) { - Carp::carp("Hides field '$f' in base class") if $^W; + warnings::warnif("Hides field '$f' in base class") ; } else { Carp::croak("Field name '$f' already in use"); }