summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-13 21:29:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-13 21:29:15 +0000
commit9f1b1f2d9ab55954ee07a14c4ab04bd3dd1f99d5 (patch)
treef3e99c675e49f21e2edc6600cd4c0b10b14c41d5 /lib
parent828c4421567f1da54062ec5edfcc3250be409b16 (diff)
downloadperl-9f1b1f2d9ab55954ee07a14c4ab04bd3dd1f99d5.tar.gz
lexical warnings update for docs and tests (from Paul Marquess)
p4raw-id: //depot/perl@5712
Diffstat (limited to 'lib')
-rw-r--r--lib/fields.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fields.pm b/lib/fields.pm
index 5a84e28f2e..ac4581036f 100644
--- a/lib/fields.pm
+++ b/lib/fields.pm
@@ -130,6 +130,7 @@ L<perlref/Pseudo-hashes: Using an array as a hash>
use 5.005_64;
use strict;
no strict 'refs';
+use warnings::register;
our(%attr, $VERSION);
$VERSION = "1.01";
@@ -171,7 +172,8 @@ sub import {
if ($fno and $fno != $next) {
require Carp;
if ($fno < $fattr->[0]) {
- Carp::carp("Hides field '$f' in base class") if $^W;
+ warnings::warn("Hides field '$f' in base class")
+ if warnings::enabled();
} else {
Carp::croak("Field name '$f' already in use");
}