Move the readonly interface back to universal.c,
[p5sagit/p5-mst-13.2.git] / lib / fields.pm
index ac45810..be2a7ae 100644 (file)
@@ -127,13 +127,13 @@ L<perlref/Pseudo-hashes: Using an array as a hash>
 
 =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 }
@@ -172,8 +172,7 @@ sub import {
        if ($fno and $fno != $next) {
            require Carp;
             if ($fno < $fattr->[0]) {
-                warnings::warn("Hides field '$f' in base class") 
-                   if warnings::enabled();
+                warnings::warnif("Hides field '$f' in base class") ;
             } else {
                 Carp::croak("Field name '$f' already in use");
             }