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

Richard Jones ra.jones at dpw.clara.co.uk
Tue Apr 15 09:48:17 BST 2008


Jason Kohles wrote:

> I do it like this...
> 
> use Catalyst (
>     ( $ENV{ Catalyst::Utils::class2env( __PACKAGE__ ).'_STATS' } ? ( 
> -Stats=1 ) : () ),
>     qw( Other Plugins Here ... ),
> );

Interesting. When I do an %ENV dump comparison between starting the 
devel server at the console and running it via t/*.t, about the only 
obvious difference I could exploit is that *.t sets the HARNESS_ACTIVE & 
HARNESS_VERSION keys, and console sets the CATALYST_ENGINE key. 
Obviously the latter isn't going to work when I move to mod_perl or Fast 
CGI for production, but presumably the HARNESS_* flags would be 
reliable? It seems to work for now anyway, but I don't see anything in 
%ENV matching class2env.
-- 
Richard Jones



More information about the Catalyst mailing list