Re: Using class::dbi::factory with multiple table classes in a single file

[prev] [thread] [next] [Date index for 2005/04/05]

From: William Ross
Subject: Re: Using class::dbi::factory with multiple table classes in a single file
Date: 18:55 on 05 Apr 2005
On 5 Apr 2005, at 19:41, Thomas L Shinnick wrote:

> At 13:05 4/5/2005, Barry Dancis wrote:
>> Hi--
>>
>>    Is there a way to have the class::dbi subclass definitions all in 
>> the same file and  use class::dbi::factory?
>> If I place each subclass in its own file, factory works fine. If I 
>> collect them all into a single pm file, I get an error when I try to 
>> get the colums
>>
>>    my @columns = $WebCams->columns ('assay');
>> and the message is:
>>
>>    failed to load class 'Assay': Can't locate Assay.pm in @INC
>
> Total speculation here, but I wonder if this situation is the reason 
> for a bit of code I found in CGI::Prototype::Hidden :
>
>   eval "require $package" unless eval "defined %${package}::";

Ooh. That's nice. Let's do that.

thanks.

will

Re: Using class::dbi::factory with multiple table classes in a single file
William Ross 18:55 on 05 Apr 2005

Generated at 14:42 on 11 Apr 2005 by mariachi v0.52