[Catalyst] debug mode

Dylan Vanderhoof DylanV at semaphore.com
Mon Jun 4 20:55:38 GMT 2007


Oh, missed this email.  Yours looks better than mine.  =)

-D

> -----Original Message-----
> From: Matthew Pitts [mailto:mpitts at a3its.com] 
> Sent: Monday, June 04, 2007 8:23 AM
> To: The elegant MVC web framework
> Subject: RE: [Catalyst] debug mode
> 
> 
> 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 = 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.
> 
> Enjoy,
> 
> Matt Pitts
> 
> On Mon, 2007-06-04 at 15:51 +0100, mark wrote:
> > I thought a nice way would be to be able to specify it in the config
> > file; then your _local.yml file could add it for the dev 
> environment.
> > Yet to produce a patch for that though it should be pretty straight
> > forwards.
> >  
> > Mark
> > 
> > 
> > 
> ______________________________________________________________________
> > From: John Goulah [mailto:jgoulah at gmail.com] 
> > Sent: 04 June 2007 15:32
> > To: The elegant MVC web framework
> > Subject: [Catalyst] debug mode
> > 
> > 
> > 
> > What is the best way to deal with the -Debug flag between a 
> production
> > and development environment?  Obviously its not desirable to go into
> > the file and remove the flag every time the code goes to 
> prod.   I see
> > you can start the stanalone server with -d to force debug.  
> I think I
> > remember about an environment variable to set debug also.  Is the
> > preferred method to take the hardcoded flag out and use one 
> of these,
> > or is there another way (such as a config option)?  How are people
> > dealing with this? 
> > 
> > Thanks,
> > John
> > _______________________________________________
> > List: Catalyst at 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/
> 
> _______________________________________________
> List: Catalyst at 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/
> 



More information about the Catalyst mailing list