This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
2 more VMS test tweaks
[perl5.git] / lib / fields.pm
index 5a84e28..be2a7ae 100644 (file)
@@ -127,12 +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 }
@@ -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");
             }