diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-13 11:09:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-13 11:09:05 +0000 |
commit | d3a7d8c7d7e4d69d7d81e4e3e900ec57f07ca07c (patch) | |
tree | 46e26336d8cdf0e9f503f5650660a4aafcc09411 /lib/Tie/Hash.pm | |
parent | d16e9ed98812a2e69b435f9514ff8e38e7ff38ad (diff) | |
download | perl-d3a7d8c7d7e4d69d7d81e4e3e900ec57f07ca07c.tar.gz |
final touches for lexical warnings (from Paul Marquess)
p4raw-id: //depot/perl@5702
Diffstat (limited to 'lib/Tie/Hash.pm')
-rw-r--r-- | lib/Tie/Hash.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm index 928b798e45..c6ec3d4f5c 100644 --- a/lib/Tie/Hash.pm +++ b/lib/Tie/Hash.pm @@ -102,6 +102,7 @@ good working examples. =cut use Carp; +use warnings::register; sub new { my $pkg = shift; @@ -113,8 +114,8 @@ sub new { sub TIEHASH { my $pkg = shift; if (defined &{"${pkg}::new"}) { - carp "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing" - if $^W; + warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing" + if warnings::enabled(); $pkg->new(@_); } else { |