Grokbase
Topics Posts Groups | in
x
[ help ]

Re: [Catalyst] New Root Controller in Catalyst 5.66

View PostFlat  Thread  Threaded | < Prev - Next >
Marcus Ramberg Re: [Catalyst] New Root Controller in Catalyst 5.66
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On 4/17/06, Sebastian Riedel <sri@oook.de> wrote:
>
>
> 17.04.2006 15:30 Matt S Trout:
>
> > Sébastien Wagener wrote:
> >> On Wed, 2006-03-01 at 13:27 +0000, Matt S Trout wrote:
> >>> On Wed, Mar 01, 2006 at 06:00:01AM +0100, Sebastian Riedel wrote:
> >>>> 01.03.2006 05:39 Nilson Santos Figueiredo Junior:
> >>>>
> >>>>> On 3/1/06, Sebastian Riedel <sri@oook.de> wrote:
> >>>>>> This is another best practice promoted to be part of core, it
> >>>>>> will
> >>>>>> eliminate namespace collisions like for the famous "login"
> >>>>>> action in
> >>>>>> combination with auth plugins. ;)
> >>>> The application class was from the beginning just meant as a
> >>>> place to
> >>>> interact with Catalyst "internals", load plugins, configure the app
> >>>> and the like.
> >>> And of course, your $c for each request is blessed into that
> >>> class by
> >>> default (unless you set __PACkAGE__->context_class to something
> >>> else).
> >>>
> >> Is it normal that I still have to put the end action into the app
> >> class
> >> (instead of the Root controller) while using DefaultEnd?
> >>
> >> My end action:
> >> sub end : Private {
> >>   my ($self, $c) = @_;
> >> $c->log->debug("app end action");
> >>   $c->NEXT::end( $c );
> >> }
> >
> > Catalyst::Plugin::DefaultEnd should probably really be
> > Catalyst::Controller::DefaultEnd; I usually have my Controller::Root
> >
> > use base qw/Catalyst::Controller Catalyst::Plugin::DefaultEnd/;
>
> It should be a action class.
>
>      sub end : Private : Action('DefaultEnd') {}


Actiually it will be
sub end : Action('RenderView') {}

The module is ready and awaiting the release of Catalyst 5.70. This will
also make overriding functionality a whole lot easier.


--
With regards
Marcus Ramberg

_______________________________________________
Catalyst mailing list
[email protected: Cat...@lists.rawmode.org]
http://lists.rawmode.org/mailman/listinfo/catalyst

Thread : [Catalyst] New Root Controller in Catalyst 5.66
1)
Sebastian Riedel There has been a small change in trunk for the catalyst.pl generated MyApp.pm. MyApp.pm will no...
2)
nilsonsfj This change is great for those who started using Catalyst. I got somewhat frustrated when I spent...
3)
Sebastian Riedel Right, it gets "cleaner". :) The application class was from the beginning just meant as a place to...
4)
Matt S Trout And of course, your $c for each request is blessed into that class by default (unless you set...
5)
Bill Moseley Is it expected that all extensions would be in the form of plugins? For common code that doesn't...
6)
Matt S Trout Sticking assorted useful methods onto your context class (which currently is also your appclass) is...
7)
Joe Landman Quick question on this. Given that we are at an early stage of development in our application, and...
8)
nilsonsfj Maybe a bit simplistic, but I think the best approach seems to be updating everything from time to...
9)
Sébastien Wagener Is it normal that I still have to put the end action into the app class My end action: sub end :...
10)
Matt S Trout Catalyst::Plugin::DefaultEnd should probably really be Catalyst::Controller::DefaultEnd; I usually...
11)
Sebastian Riedel It should be a action class. sub end : Private : Action('DefaultEnd') {}
12)
T. H. Lin after reading http://www.catalystframework.org/calendar/2005/8 I did # in MyAPP.pm use Catalyst...
13)
T. H. Lin #if in in MyApp/Controller/Root.pm sub end : Private { my ( $self, $c ) = @_; #code before view...
14)
Len Jaffe As expected. Don't define your own private end, and the default end will run in the plugin.
15)
Chisel Wright Or if you really need bits of both worlds: sub end : Private { my ($self, $c) = @_; # some stuff #...
16)
T. H. Lin Catalyst 5.66 Catalyst::Plugin::ConfigLoader 0.06 Catalyst::Plugin::DefaultEnd 0.06...
17)
Matt S Trout Did you change your code to match what I suggested? I'm using this in half a dozen apps, so it...
18)
Chisel Wright I agree, after having this suggested to me a while back I've been sucessfully using it in Parley...
19)
Robert 'phaylon' Sedlacek Matt S Trout said: Sure you didn't mean C<< $self->NEXT::end( $c ) >> instead of using $c as...
20)
Matt S Trout Damn. Code blind. Yes.
21)
T. H. Lin :-p
22)
Marcus Ramberg Actiually it will be sub end : Action('RenderView') {} The module is ready and awaiting the release...
23)
Sebastian Riedel DefaultEnd is a plugin and will put *its* end action into the app = class, but there will be a new...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >