[Catalyst] $c->comp($name) fails to return the correct class

Alan Tam Tam at SiuLung.com
Sat Sep 24 15:45:06 CEST 2005


Bernhard Graf wrote:

>>Anyone can tell me what did I do wrong? Thanks a lot!
>>    
>>
>http://lists.rawmode.org/pipermail/catalyst/2005-August/001464.html
>  
>
Thanks for your pointer! No matter I agree with whether regex is good or 
bad, no reason can we cast the class to its boolean context.

Given my limited perl knowledge, I can workaround by either patching 
Class::DBI to always return true or Catalyst::Engine to use defined(). 
Any more choice for me?

My "MyApp::M::CDBI" looks like below and I do not define all other 
MyApp::M classes.

package MyApp::M::CDBI;
use strict;
use base "Catalyst::Model::CDBI::CRUD";
__PACKAGE__->config(%{YAML::LoadFile("$ENV{CATALYST_HOME}conf/database.yml")});
1;

-- 
Regards,
Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050924/ebc6c4b0/attachment.htm


More information about the Catalyst mailing list