[Catalyst] debug mode

Matthew Pitts mpitts at a3its.com
Tue Jun 5 13:40:52 GMT 2007


On Tue, 2007-06-05 at 01:18 +0100, Matt S Trout wrote:
> 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 ...).

Am I correct in saying that the NEXT overhead is proportional to the
number of packages in the ISA chain and not the number of methods the
plugins override? If so, then if I were to bring all my plugins into one
big "framework" plugin would that improve the NEXT performance?

Thanks,

Matt

>  
> > > -----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/
> 



More information about the Catalyst mailing list