Re: [Catalyst] How to use querylog plugin...

2007-09-18 Thread Marcello Romani

Marcello Romani ha scritto:

Marcello Romani ha scritto:

Matt S Trout ha scritto:

On Wed, Sep 12, 2007 at 04:13:36PM +0200, Marcello Romani wrote:

Hallo,
I've installed C::P::QueryLog and installed the template 
provided by the pod doc, but I always get 0.00 seconds of elapsed 
time, no matter how many db accesses I do.


Uninstall it and use the replacement model mixin the author wrote after
discussions on here about why it shouldn't have been a plugin.



Well in fact I'm not using that pulgin at all... (I just installed it 
- sorry for not thinking twice before writing).
I'm testing it in two separate ways: by using 
C::M::DBIC::Schema::QueryLog as base class for my model class, and by 
attaching a DBIx::Class::QueryLog object to the $schema instance.


The problem is that the querylog object doesn't collecte any data (or 
so it seems to me, since the stats are all zero...)


I think I'll build a simple dummy app just for testing the querylog, 
so I get to know it (I'm trying to use it in a non-trivial app). 
Sometimes in order to solve a problem you need to isolate it...


Thanks.



Ok, I've written a very small app that only has one table 
(users(id,name,email)) and a couple of methods (create, list). The app's 
model use base C::M::DBIC::Schema::QueryLog.
Now my problem is how to obtain the querylog object used in the template 
from the docs...


Thanks.



For future reference: if the model is

MyApp::Model::Main

then one can access the querylog object by calling:

$c-model('Main')-querylog

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] How to use querylog plugin...

2007-09-14 Thread Marcello Romani

Matt S Trout ha scritto:

On Wed, Sep 12, 2007 at 04:13:36PM +0200, Marcello Romani wrote:

Hallo,
I've installed C::P::QueryLog and installed the template provided 
by the pod doc, but I always get 0.00 seconds of elapsed time, no matter 
how many db accesses I do.


Uninstall it and use the replacement model mixin the author wrote after
discussions on here about why it shouldn't have been a plugin.



Well in fact I'm not using that pulgin at all... (I just installed it - 
sorry for not thinking twice before writing).
I'm testing it in two separate ways: by using 
C::M::DBIC::Schema::QueryLog as base class for my model class, and by 
attaching a DBIx::Class::QueryLog object to the $schema instance.


The problem is that the querylog object doesn't collecte any data (or so 
it seems to me, since the stats are all zero...)


I think I'll build a simple dummy app just for testing the querylog, 
so I get to know it (I'm trying to use it in a non-trivial app). 
Sometimes in order to solve a problem you need to isolate it...


Thanks.

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] How to use querylog plugin...

2007-09-12 Thread Marcello Romani

Hallo,
I've installed C::P::QueryLog and installed the template provided 
by the pod doc, but I always get 0.00 seconds of elapsed time, no matter 
how many db accesses I do.
The DBIC::Querylog doc made me think that perhaps I need to explicitly 
assign the querylog object to the schema storage, and activate its debug 
flag. But I understand that the connection is not made until some db 
data is actually needed...


My question is therefore this: is there something I need to setup in the 
app config to make querylog collect data ?


Thanks in advance.

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] How to use querylog plugin...

2007-09-12 Thread Matt S Trout
On Wed, Sep 12, 2007 at 04:13:36PM +0200, Marcello Romani wrote:
 Hallo,
 I've installed C::P::QueryLog and installed the template provided 
 by the pod doc, but I always get 0.00 seconds of elapsed time, no matter 
 how many db accesses I do.

Uninstall it and use the replacement model mixin the author wrote after
discussions on here about why it shouldn't have been a plugin.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/