[Catalyst] debug mode

Matt S Trout dbix-class at trout.me.uk
Tue Jun 5 01:18:15 GMT 2007


On Mon, Jun 04, 2007 at 12:55:38PM -0700, Dylan Vanderhoof wrote:
> Oh, missed this email.  Yours looks better than mine.  =)

Except for being a performance hit on every single method call on $c (there's
a reason I keep telling people not to make everything a plugin ...).
 
> > -----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/
> > 
> 
> _______________________________________________
> 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/

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



More information about the Catalyst mailing list