summaryrefslogtreecommitdiff
path: root/lib/Tie/Hash.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Tie/Hash.pm')
-rw-r--r--lib/Tie/Hash.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm
index c6ec3d4f5c..2244711669 100644
--- a/lib/Tie/Hash.pm
+++ b/lib/Tie/Hash.pm
@@ -114,8 +114,7 @@ sub new {
sub TIEHASH {
my $pkg = shift;
if (defined &{"${pkg}::new"}) {
- warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing"
- if warnings::enabled();
+ warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing");
$pkg->new(@_);
}
else {