[Catalyst] Debugging DBIC inside a catalyst app
Ash Berlin
ash at cpan.org
Thu Jun 22 13:44:21 CEST 2006
Kevin Old wrote:
> On 6/21/06, Eric W. Bates <ericx at vineyard.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I have read in the new Catalyst/Manual/Tutorial/CatalystBasics.pod (the
>> whole tutorial is very nice, btw) that you can invoke DBIC's debugging
>> inside your code thusly:
>>
>> $class->storage->debug(1);
>>
>> However, I cannot figure out where to get "$class". I have tried in a
>> controller:
>>
>>
>> as a fully named model class method:
>>
>> HG::Model::HorshamDB::Plants->storage()->debug(1);
>>
>>
>> as an abbreviated model class method:
>>
>> HorshamDB::Plants->storage()->debug(1);
>>
>>
>> from the Catalyst object:
>>
>> $c->model('HorshamDB::Plants')->storage()->debug(1);
>>
>
> Eric,
>
> It also states above that Note that you can use the following
> environmental variable to achieve the same effect.
>
> export DBIX_CLASS_STORAGE_DBI_DEBUG=1
>
> Kevin
>
FYI Eric
You'd need to do it on the schema object directly, so
$c->model('HorshamDB')->storage->debug(1);
Ash
More information about the Catalyst
mailing list