diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2006-08-24 02:04:12 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-08-25 15:24:28 +0000 |
commit | 20f4e2894de71066f1bcf3cb358fa8516d79a32d (patch) | |
tree | 6dbcacece7039a5cbe4ad6c5bdfc2a72ea6db818 /lib | |
parent | 5d0b10e0e277da4dc4a7c7f47ea4de1c0bbe695a (diff) | |
download | perl-20f4e2894de71066f1bcf3cb358fa8516d79a32d.tar.gz |
RE: [perl #40227] 'reserved' warning not working
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <20060824090412.fb30e530d17747c2b054d625b8945d88.e8ae12ccab.wbe@email.secureserver.net>
p4raw-id: //depot/perl@28756
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attributes.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/attributes.pm b/lib/attributes.pm index 544e2f5f7a..cddac3d8a9 100644 --- a/lib/attributes.pm +++ b/lib/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.07; +our $VERSION = 0.08; @EXPORT_OK = qw(get reftype); @EXPORT = (); @@ -23,7 +23,6 @@ sub carp { #sub _fetch_attrs ($) ; #sub _guess_stash ($) ; #sub _modify_attrs ; -#sub _warn_reserved () ; # # The extra trips through newATTRSUB in the interpreter wipe out any savings # from avoiding the BEGIN block. Just do the bootstrap now. @@ -45,7 +44,8 @@ sub import { my @pkgattrs = _modify_attrs($svref, @attrs); @badattrs = $pkgmeth->($home_stash, $svref, @pkgattrs); if (!@badattrs && @pkgattrs) { - return unless _warn_reserved; + require warnings; + return unless warnings::enabled('reserved'); @pkgattrs = grep { m/\A[[:lower:]]+(?:\z|\()/ } @pkgattrs; if (@pkgattrs) { for my $attr (@pkgattrs) { |