Skip Menu |

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

Report information
The Basics
Id: 3982
Status: resolved
Priority: 0/
Queue: Class-DBI-BaseDSN

People
Owner: Nobody in particular
Requestors: struan [...] exo.org.uk
Cc:
AdminCc:

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



Subject: Doesn't check return value of $package->can
Hi, I'll admit that it's slightly hard to achieve but if you have weird dependancy issues (like DBI isn't install but Class::DBI is) then $package->can('set_db') returns "" which causes the goto to barf with the not very helpful error message: Unable to create sub named "". So maybe a or die "$package cannot set_db" type thing might be in order. Just FYI you can achieve this by the not uncommon approach of installing a new perl that has directories of pure perl modules in @INC and then trying to use Class::DBI::BaseDSN before you install DBI for the new perl. Cheers Struan
Date: Mon, 6 Oct 2003 10:47:23 +0100
From: Richard Clamp <richardc [...] unixbeard.net>
To: Guest via RT <bug-Class-DBI-BaseDSN [...] rt.cpan.org>
CC: "AdminCc of cpan Ticket #3982": ;
Subject: Re: [cpan #3982] Doesn't check return value of $package->can
RT-Send-Cc:
On Sat, Oct 04, 2003 at 05:47:31PM -0400, Guest via RT wrote: Show quoted text
> I'll admit that it's slightly hard to achieve but if you have weird > dependancy issues (like DBI isn't install but Class::DBI is) then > $package->can('set_db') returns "" which causes the goto to barf > with the not very helpful error message: Unable to create sub named "".
I'm sorry - I don't follow you. If Class::DBI::BaseDSN fails to find a Class::DBI::$dsn module it falls back on Class::DBI, which is a prerequisite of the distribution. If you've satisfied that dependency but don't have a working copy of Class::DBI then it seems that the dependencies of Class::DBI itself are inaccurate. If that's what the issue is then I'd suggest investigating that. -- Richard Clamp <richardc@unixbeard.net>