Jason Kohles wrote:
On Mar 17, 2007, at 11:48 AM, RA Jones wrote:
What am I doing wrong?
I haven't tried this, but if you are trying to do it in Catalyst, your
best bet is probably to inject it into the model...
package MyApp::Model::MyDB;
use strict;
use warnings;
use base 'Catalyst::Model::DBIC::Schema';
use NEXT;
__PACKAGE__->config( schema_class => 'MyDB::Schema' );
sub new {
my $self = shift->NEXT::new( @_ );
$self->storage->debugobj( My::MySQL::Profiler->new() );
$self->storage->debug( 1 );
return $self;
}
All working nicely now in MyApp/Model/Schema, using:
$self->storage->debugobj(new DBIx::Class::QueryLog);
Many thanks
--
Richard Jones
Leeds, UK
ra.jones(at)dpw.clara.co.uk
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/