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

2008-04-25 Thread Jon Schutz
On Fri, 2008-04-25 at 15:53 +0100, Matt S Trout wrote: > > There's no written standard currently; I'd love to see somebody take a > crack at writing one but I'm not sure what would need to go in it. > I've attached a draft based on some of our company procedures to show the sorts of things that

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

2008-04-25 Thread Matt S Trout
On Thu, Apr 24, 2008 at 06:19:48PM +0930, Jon Schutz wrote: > > I'm aware you object on principle; however I've stated very clearly why I > > believe your objections are incorrect and since you're contributing to > > Catalyst I'd ask that you follow the current Catalyst standards for > > backwards

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

2008-04-24 Thread Jonathan Rockway
* On Thu, Apr 24 2008, Jon Schutz wrote: > A "standard" is not a standard unless it's written down as a common > reference for everybody to see. People in the community come and go and > don't all have the same history, or longevity of memory for all the > "let's make this a standard" decisions th

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

2008-04-24 Thread Ashley
On Apr 24, 2008, at 2:49 AM, Jon Schutz wrote: Basically it's more of a "zeitgeist" than an actual document. There are some things that the community has decided and "just do". One is not breaking things or adding features between point releases. We've fucked this up a number of times, but

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

2008-04-24 Thread Jon Schutz
On Thu, 2008-04-24 at 04:16 -0500, Jonathan Rockway wrote: > > > > No problems, if that's what the Catalyst standard says; I must have > > missed it. Where is it? I'd like to consult it on a number of > > matters... please post the link. > > Basically it's more of a "zeitgeist" than an actual d

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

2008-04-24 Thread Jonathan Rockway
* On Thu, Apr 24 2008, Jon Schutz wrote: > On Mon, 2008-04-21 at 19:16 +0100, Matt S Trout wrote: >> That's not a compromise, that's an AUTOLOAD, which is poor coding practice >> when you know what methods the object on the other side exists. > > Indeed it is a compromise. It's not a compromise.

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

2008-04-24 Thread Jon Schutz
On Mon, 2008-04-21 at 19:16 +0100, Matt S Trout wrote: > On Mon, Apr 21, 2008 at 11:49:56AM +0930, Jon Schutz wrote: > > On Sun, 2008-04-20 at 15:15 +0100, Matt S Trout wrote: > > > > > So far as I can see, all we really need to do is supply a proxy of the > > > common Tree::Simple method from the

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

2008-04-24 Thread Jon Schutz
On Mon, 2008-04-21 at 19:18 +0100, Matt S Trout wrote: > On Mon, Apr 21, 2008 at 11:29:56AM +0930, Jon Schutz wrote: > > I'm making a stand here for the rights of all developers! Backward > > compatibility is a must for defined interfaces, but to carry that > > through to say that all design decis

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

2008-04-21 Thread Matt S Trout
On Mon, Apr 21, 2008 at 11:29:56AM +0930, Jon Schutz wrote: > I'm making a stand here for the rights of all developers! Backward > compatibility is a must for defined interfaces, but to carry that > through to say that all design decisions turn into interfaces that must > be preserved, even though

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

2008-04-21 Thread Matt S Trout
On Mon, Apr 21, 2008 at 11:49:56AM +0930, Jon Schutz wrote: > On Sun, 2008-04-20 at 15:15 +0100, Matt S Trout wrote: > > > So far as I can see, all we really need to do is supply a proxy of the > > common Tree::Simple method from the C::Stats object through to $self->{tree} > > and we're done. Tha

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

2008-04-20 Thread Jon Schutz
On Sun, 2008-04-20 at 15:15 +0100, Matt S Trout wrote: > So far as I can see, all we really need to do is supply a proxy of the > common Tree::Simple method from the C::Stats object through to $self->{tree} > and we're done. That'll provide compatibility with obvious usages without > adding any si

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

2008-04-20 Thread Jon Schutz
On Sat, 2008-04-19 at 10:39 -0500, Cory Watson wrote: > On Sat, Apr 19, 2008 at 9:48 AM, Jon Schutz [EMAIL PROTECTED]> wrote: > > > I apologise to anyone who was inconvenienced by this change. > I've > written a guide to upgrading for anyone who was using

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

2008-04-20 Thread Matt S Trout
On Sat, Apr 19, 2008 at 10:39:50AM -0500, Cory Watson wrote: > On Sat, Apr 19, 2008 at 9:48 AM, Jon Schutz > > Nevertheless I stand by my comment that anyone who digs through the > > source code to find an internal object or function and then chooses to > > use that in external code does so at thei

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

2008-04-19 Thread Cory Watson
On Sat, Apr 19, 2008 at 9:48 AM, Jon Schutz <[EMAIL PROTECTED]<[EMAIL PROTECTED]>> wrote: > > I apologise to anyone who was inconvenienced by this change. I've > written a guide to upgrading for anyone who was using the Tree::Simple > object directly: > > > http://notes.jschutz.net/17/perl/adding

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

2008-04-19 Thread Jon Schutz
On Fri, 2008-04-18 at 19:54 +0100, Matt S Trout wrote: > On Sat, Apr 12, 2008 at 08:37:49PM +0930, Jon Schutz wrote: > > Prior to 5.7012, $c->stats was an internal object (in so far as it was > > not documented as part of the API) so anyone manipulating it directly > > does so at their own risk. >

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

2008-04-18 Thread Matt S Trout
On Sat, Apr 12, 2008 at 08:37:49PM +0930, Jon Schutz wrote: > Prior to 5.7012, $c->stats was an internal object (in so far as it was > not documented as part of the API) so anyone manipulating it directly > does so at their own risk. This one user who was kind enough to report it to the list will

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

2008-04-15 Thread Richard Jones
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 i

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

2008-04-15 Thread Richard Jones
Jon Schutz wrote: Other way around ... MYAPP_STATS=1 myapp_server.pl or export MYAPP_STATS=1 myapp_server.pl Working at last! Many thanks. -- Richard Jones ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/l

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

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

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

2008-04-14 Thread Richard Jones
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_se

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

2008-04-13 Thread Jon Schutz
On Sun, 2008-04-13 at 15:35 +0100, Richard Jones wrote: > Jon Schutz wrote: > > > Following the example in the blog post, the solution is to set -Stats > > and change your Root::end() method to something like: > > > > @report = $stats->report; > > $c->stash->{'action_stats'} = [EMAIL PROTECTED];

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

2008-04-13 Thread Richard Jones
Jon Schutz wrote: Following the example in the blog post, the solution is to set -Stats and change your Root::end() method to something like: @report = $stats->report; $c->stash->{'action_stats'} = [EMAIL PROTECTED]; and then adjust your template as now you're getting an array of arrays rather

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

2008-04-12 Thread Jon Schutz
On Sat, 2008-04-12 at 10:45 +0100, Richard Jones wrote: > > I think you probably want $c->stats->report, but can't think why you're > > calling this directly as it is invoked in finalize() if -Debug or -Stats > > is set. See perldoc Catalyst::Stats. > > > > Because I never got round to delving

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

2008-04-12 Thread Richard Jones
Jon Schutz wrote: On Fri, 2008-04-11 at 19:53 +0100, Richard Jones wrote: Yeah I tried -Stats already - something must have changed in a recent version of Catalyst::Stats, as now I get: [error] Caught exception in MyApp::Controller::Root->end "Can't locate object method "accept" via package "

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

2008-04-11 Thread Jon Schutz
On Fri, 2008-04-11 at 19:53 +0100, Richard Jones wrote: > Yeah I tried -Stats already - something must have changed in a recent > version of Catalyst::Stats, as now I get: > > [error] Caught exception in MyApp::Controller::Root->end "Can't locate > object method "accept" via package "Catalyst::S

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

2008-04-11 Thread Richard Jones
Jon Schutz wrote: From the perldoc for 5.7012 - "Stats collection is enabled when the '-Stats' options is set, debug is on or when the _STATS environment variable is set." So, if you want stats but not debug, use -Stats instead of -Debug. Yeah I tried -Stats already - something must have cha

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

2008-04-10 Thread Jon Schutz
On Thu, 2008-04-10 at 19:51 +0100, Matt S Trout wrote: > On Thu, Apr 10, 2008 at 05:02:26PM +0100, Richard Jones wrote: > > I've just tried to run my app. without the -Debug flag and now I just > > get the '(en) Please come back later' (+ several other languages) error > > page. I've traced it to

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

2008-04-10 Thread Matt S Trout
On Thu, Apr 10, 2008 at 05:02:26PM +0100, Richard Jones wrote: > I've just tried to run my app. without the -Debug flag and now I just > get the '(en) Please come back later' (+ several other languages) error > page. I've traced it to the use of $c->stats in the end() method in the > Root contro

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

2008-04-10 Thread Richard Jones
I've just tried to run my app. without the -Debug flag and now I just get the '(en) Please come back later' (+ several other languages) error page. I've traced it to the use of $c->stats in the end() method in the Root controller, which is an ActionClass('RenderView') method: [error] Caught ex