On 11 Jul 2009, at 19:47, Minty wrote:

But I want to inject my $debugger via the Model or schema, and
enable/disable it globablly via a configuration file flag.

What I meant to say was I want to inject my custom debugobj handler
globally (at least in development), then simplify the code in the
Controllers to just:

 $model->result_source->storage->debug(1);
 my $employee = $mode->find(123);
 $model->result_source->storage->debug(0);

When I want to debug that one particular query.


See http://search.cpan.org/perldoc?Catalyst::Model::DBIC::Schema::QueryLog and http://search.cpan.org/perldoc?Catalyst::TraitFor::Model::DBIC::Schema::QueryLog .

That includes a TT snippet you can (conditionally) put in your wrapper, or you could produce something similar for console output

-ash

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to