summaryrefslogtreecommitdiff
path: root/lib/Class/Struct.pm
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2000-08-18 23:42:06 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-18 21:55:14 +0000
commit7e6d00f88633359fc96f8d1e8d7c3aa419c0d976 (patch)
tree115e92e1d9659da8ccbcc678280e29721d6d8a57 /lib/Class/Struct.pm
parent68cc8748cd09408eb4c1922bf0cb3edbeb4cec80 (diff)
downloadperl-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/Class/Struct.pm')
-rw-r--r--lib/Class/Struct.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm
index 63eddac739..ac1fb4736d 100644
--- a/lib/Class/Struct.pm
+++ b/lib/Class/Struct.pm
@@ -168,8 +168,7 @@ sub struct {
$cnt = 0;
foreach $name (@methods){
if ( do { no strict 'refs'; defined &{$class . "::$name"} } ) {
- warnings::warn "function '$name' already defined, overrides struct accessor method"
- if warnings::enabled();
+ warnings::warnif("function '$name' already defined, overrides struct accessor method");
}
else {
$pre = $pst = $cmt = $sel = '';