diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-22 15:17:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-22 15:17:54 +0000 |
commit | ac8e80845b5f5f80ca4d75f0efae260754ee057a (patch) | |
tree | af8e711b96299c9fddbb17af2d034ee5d62a6783 /lib | |
parent | 7743c30757199ca2f38bf73a40c6d3a6aef6b5ea (diff) | |
download | perl-ac8e80845b5f5f80ca4d75f0efae260754ee057a.tar.gz |
Don't AUTOLOAD DESTROY from Attribute::Handlers.
(patch by Jerry D. Hedden for CPAN bug #1911)
p4raw-id: //depot/perl@29351
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Attribute/Handlers.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index a9ce6b0537..197ee6c88e 100644 --- a/lib/Attribute/Handlers.pm +++ b/lib/Attribute/Handlers.pm @@ -2,7 +2,7 @@ package Attribute::Handlers; use 5.006; use Carp; use warnings; -$VERSION = '0.78_04'; +$VERSION = '0.78_05'; # $DB::single=1; my %symcache; @@ -100,14 +100,13 @@ sub _resolve_lastattr { } sub AUTOLOAD { + return if $AUTOLOAD =~ /::DESTROY$/; my ($class) = $AUTOLOAD =~ m/(.*)::/g; $AUTOLOAD =~ m/_ATTR_(.*?)_(.*)/ or croak "Can't locate class method '$AUTOLOAD' via package '$class'"; croak "Attribute handler '$2' doesn't handle $1 attributes"; } -sub DESTROY {} - my $builtin = qr/lvalue|method|locked|unique|shared/; sub _gen_handler_AH_() { |