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

Report information
The Basics
Id:
5682
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
domm [...] zsi.at
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
0.95
Fixed in:
0.96



Subject: Problem with add_constructor and inheritance
IMO add_constructor is semi-broken. If a have a base Class: MyApp and do MyApp->add_constructor(retrieve_public,'some sql'); and a class inheriting from MyAll, MyAll::SpecialCase in which I want to set another constructor 'retrieve_public', via MyApp::SpecialCase->add_constructor(retrieve_public,'some ohter sql'); Class::DBI croaks "$method already exists in $class" This happens because add_costructor checks $class->can($method), when IMO it should check if there is a CODE-Typeglob (or whatever this is called) in the actual package. The attached patch changes the behaviour of add_constructor to allow subclassing of constructors. I didn't take a closer look if this problem occures in other comparable methods, too.

Message body not shown because it is not plain text.



This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.