Re: [Catalyst] Why does $c-stats require -Debug flag?

2008-04-14 Thread Jon Schutz
On Mon, 2008-04-14 at 20:21 +0100, Richard Jones wrote:
 Jon Schutz wrote:
  Did you set the -Stats flag to a non-zero value? i.e.
  
   use Catalyst qw/-Stats=1/
 
 Err, no ;-) But I have now and it's fine - thanks. But there seems to be 
 nothing I can do to set the flag at the command line when I start the 
 devel. server (eg myapp_server.pl -Stats, myapp_server.pl MYAPP_STATS=1, 
 myapp_server -STATS=1, etc). The idea is to enable stats for browser 
 access but spare the t/*.t tests from dumping masses of timing data to 
 the console when run.

Other way around ...

MYAPP_STATS=1 myapp_server.pl

or

export MYAPP_STATS=1
myapp_server.pl



-- 

Jon SchutzMy tech notes http://notes.jschutz.net
Chief Technology Officerhttp://www.youramigo.com
YourAmigo 


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Why does $c-stats require -Debug flag?

2008-04-14 Thread Jason Kohles

On Apr 14, 2008, at 3:21 PM, Richard Jones wrote:

Jon Schutz wrote:

Did you set the -Stats flag to a non-zero value? i.e.
use Catalyst qw/-Stats=1/


Err, no ;-) But I have now and it's fine - thanks. But there seems  
to be nothing I can do to set the flag at the command line when I  
start the devel. server (eg myapp_server.pl -Stats, myapp_server.pl  
MYAPP_STATS=1, myapp_server -STATS=1, etc). The idea is to enable  
stats for browser access but spare the t/*.t tests from dumping  
masses of timing data to the console when run.


I do it like this...

use Catalyst (
( $ENV{ Catalyst::Utils::class2env( __PACKAGE__ ).'_STATS' } ? ( - 
Stats=1 ) : () ),

qw( Other Plugins Here ... ),
);

--
Jason Kohles, RHCA RHCDS RHCE
[EMAIL PROTECTED] - http://www.jasonkohles.com/
A witty saying proves nothing.  -- Voltaire



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/