From: Rafael Garcia-Suarez Date: Wed, 22 Nov 2006 15:17:54 +0000 (+0000) Subject: Don't AUTOLOAD DESTROY from Attribute::Handlers. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac8e80845b5f5f80ca4d75f0efae260754ee057a;p=p5sagit%2Fp5-mst-13.2.git Don't AUTOLOAD DESTROY from Attribute::Handlers. (patch by Jerry D. Hedden for CPAN bug #1911) p4raw-id: //depot/perl@29351 --- diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index a9ce6b0..197ee6c 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_() {