Skip Menu |

This queue is for tickets about the Class-Delegation CPAN distribution.

Report information
The Basics
Id: 132723
Status: resolved
Priority: 0/
Queue: Class-Delegation

People
Owner: Nobody in particular
Requestors: SVW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.9.0
Fixed in: (no value)



Subject: Class::Delegation overwrites super class DESTROY implementations
PERL version 5.14.2 I have a superclass with a dedicated implementation of the DESTROY() method. A subclass usually inherits this implementation. Then I have started to use Class::Delegation in my subclass to delegate some method calls to a third independent class. The use of Class::Delegation overwrites the DESTROY() method in my subclass with sub {}. I have debugged the code and I think the reason is line +83 unless (*{"${class}::DESTROY"}{CODE} || Instead of looking into the symbol table UNIVERSAL::can() should be used +83 unless ($class->can('DESTROY') ||
Subject: Re: [rt.cpan.org #132723] Class::Delegation overwrites super class DESTROY implementations
Date: Fri, 29 May 2020 08:27:23 +0000
To: bug-Class-Delegation [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks, Sven. That definitely is a bug. I've now patched it (and thank-you in particular for including the patch!) and uploaded a new release to CPAN. Very much appreciated! Damian