[Catalyst] debug mode
John Goulah
jgoulah at gmail.com
Mon Jun 4 22:47:32 GMT 2007
On 6/4/07, Matthew Pitts <mpitts at a3its.com> wrote:
>
> I wrote a cheap little plugin for my app to override $c->debug to return
> the debug flag from $c->config->{debug}. As such:
>
> package MyApp::Plugin::DebugMode;
>
> sub debug {
> my $c =3D shift;
>
> return $c->config->{debug} || 0;
> }
>
> 1;
>
> Then I just add a "debug: 1" line to my DEV/QA/UAT configs and make it
> "debug: 0" for my PROD config. It's been working pretty well for me.
Did you have to do anything in lib/MyApp.pm to get this to work? It seems
I would want to add this plugin, but Catalyst cant find it. I'm probably
doing something very obviously wrong, but I havent tried to write my own
plugins yet:
in lib/MyApp.pm:
use Catalyst qw/
MyApp::Plugin::DebugMode
...
/;
when I start the server:
Can't locate Catalyst/Plugin/MyApp/Plugin/DebugMode.pm in @INC
Thanks!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070604/8af35=
98b/attachment.htm
More information about the Catalyst
mailing list