diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2000-08-18 23:42:06 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-18 21:55:14 +0000 |
commit | 7e6d00f88633359fc96f8d1e8d7c3aa419c0d976 (patch) | |
tree | 115e92e1d9659da8ccbcc678280e29721d6d8a57 /lib/Tie | |
parent | 68cc8748cd09408eb4c1922bf0cb3edbeb4cec80 (diff) | |
download | perl-7e6d00f88633359fc96f8d1e8d7c3aa419c0d976.tar.gz |
Add warnif(), check warnings further up the stack,
all the warnings functions now can take an optional object reference.
Subject: [PATCH bleedperl@6691] warnings pragma update
Message-ID: <000c01c0095d$278e0040$ca01073e@bfs.phone.com>
p4raw-id: //depot/perl@6707
Diffstat (limited to 'lib/Tie')
-rw-r--r-- | lib/Tie/Handle.pm | 3 | ||||
-rw-r--r-- | lib/Tie/Hash.pm | 3 | ||||
-rw-r--r-- | lib/Tie/Scalar.pm | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/Tie/Handle.pm b/lib/Tie/Handle.pm index 588ecead89..42d0834ed8 100644 --- a/lib/Tie/Handle.pm +++ b/lib/Tie/Handle.pm @@ -120,8 +120,7 @@ sub new { sub TIEHANDLE { my $pkg = shift; if (defined &{"{$pkg}::new"}) { - warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing" - if warnings::enabled(); + warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing"); $pkg->new(@_); } else { 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 { diff --git a/lib/Tie/Scalar.pm b/lib/Tie/Scalar.pm index 0c6759006f..89ad03eddc 100644 --- a/lib/Tie/Scalar.pm +++ b/lib/Tie/Scalar.pm @@ -91,8 +91,7 @@ sub new { sub TIESCALAR { my $pkg = shift; if (defined &{"{$pkg}::new"}) { - warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing" - if warnings::enabled(); + warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing"); $pkg->new(@_); } else { |