I'm trying to get some query statistics using the methods suggested in
DBIx::Class::Manual::Cookbook, but I haven't had any success yet.
When I try adding the lines:
__PACKAGE__->storage()->debugobj(new My::Profiler());
__PACKAGE__->storage()->debug(1);
to my schema class file, Catalyst refuses to start with the message:
"Can't call method "debugobj" on an undefined value"
I think this is because 'storage' is not created until the connection
is established. Is there somewhere else I should be adding those
lines other than the schema class, or some way to delay the action?
Thanks!
Nathan Kurz
[EMAIL PROTECTED]
(following is a related tiny patch to the example in the cookbook)
----------------------------------------------------------------------------
--- DBIx/Class/Manual/Cookbook.pod~ 2006-07-25 23:23:44.000000000 -0600
+++ DBIx/Class/Manual/Cookbook.pod 2006-08-06 23:56:01.000000000 -0600
@@ -821,7 +821,7 @@
sub query_start {
my $self = shift();
my $sql = shift();
- my $params = @_;
+ my @params = @_;
print "Executing $sql: ".join(', ', @params)."\n";
$start = time();
_______________________________________________
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]/