[Dbix-class] Class::DBI vs DBIx and CDBICompat

Steven Mackenzie dbix at aptile.co.uk
Tue Jun 27 11:53:45 CEST 2006


Matt S Trout wrote:

>Steven Mackenzie wrote:
>  
>
>>Matt S Trout wrote:
>>    
>>
>>I've tried replacing the DBBase->set_db() call with  a call to
>>DBBase->connection(), but then I get this error the first time I try to
>>use one of my CDBI classes:
>>Can't call method "storage" on an undefined value at
>>C:/Perl/site/lib/DBIx/Class/ResultSource.pm line 411.
>>
>>Has this every come up before? I didn't find anything in the mailing
>>list archive ...
>>    
>>
>
>Without seeing more of your code I can't easily debug; my best guess would be 
>you're calling that after the class tree's loaded rather than in the DBBase.pm 
>file during use base.
>  
>
Yes, that's exactly what I do -- worked fine with CDBI :-(

Unfortunately, my app constructs a new DSN at each run-time from user
input. Is there a way that I can still use CDBICompat and set the
connection information at run time?




More information about the Dbix-class mailing list