summaryrefslogtreecommitdiff
path: root/lib/Class
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-13 11:09:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-13 11:09:05 +0000
commitd3a7d8c7d7e4d69d7d81e4e3e900ec57f07ca07c (patch)
tree46e26336d8cdf0e9f503f5650660a4aafcc09411 /lib/Class
parentd16e9ed98812a2e69b435f9514ff8e38e7ff38ad (diff)
downloadperl-d3a7d8c7d7e4d69d7d81e4e3e900ec57f07ca07c.tar.gz
final touches for lexical warnings (from Paul Marquess)
p4raw-id: //depot/perl@5702
Diffstat (limited to 'lib/Class')
-rw-r--r--lib/Class/Struct.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm
index b4f2117557..63eddac739 100644
--- a/lib/Class/Struct.pm
+++ b/lib/Class/Struct.pm
@@ -5,6 +5,7 @@ package Class::Struct;
use 5.005_64;
use strict;
+use warnings::register;
our(@ISA, @EXPORT, $VERSION);
use Carp;
@@ -167,8 +168,8 @@ sub struct {
$cnt = 0;
foreach $name (@methods){
if ( do { no strict 'refs'; defined &{$class . "::$name"} } ) {
- carp "function '$name' already defined, overrides struct accessor method"
- if $^W;
+ warnings::warn "function '$name' already defined, overrides struct accessor method"
+ if warnings::enabled();
}
else {
$pre = $pst = $cmt = $sel = '';