RA Jones ha scritto:
Marcello Romani wrote:
Hi all,
   I have a problem with Catalyst::Controller::FormBuilder.
It prints way too much debug information, filling up my consolle's screen buffer :-)

If I turn off Catalyst debgging by omitting the -Debug option the debug messages disappear, but so do the Catalyst ones, which I instead want to keep.

CGI::FormBuilder docs say it has four debug levels (0,1,2,3), C::P::FB says it sets the debug parameter to match Catalyst's debug setting.

I have tried various methods to set debug=0 in FB, but to no avail:

MyApp->config->{'Controller::FormBuilder'}->{debug}=0;

but then looking at the C::C::FormBuilder code I didn't see any reference to the debug flag. I also tried to modify the code, adding a debug => 0 line in $self->_fb_setup, but it didn't nothing. I'm not sure I fully understand how that code works anyway :-)

I even tried to call ->debug as a class method on CGI::FB.

It would be nice to set CGI::FB debug level independently of the Cat one.

Anyone has ideas ?

Set debug level in your CCF config settings:

__PACKAGE__->config(
  'Controller::FormBuilder' => {
    new => {
      debug => 0, # or 1, 2, etc
      # other settings eg stash_name
    }
);

Setting debug to zero still generates some useful error messages. Works for me!

Hmm, I tried your code (which afaikt should work) but putting 0,1 or 2 doesn't make any difference in the type or amount of debug messages the app is emitting.

I'll double check my code and report. Thanks for now.

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

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to