jjn1056 at yahoo
Jun 2, 2008, 1:11 PM
Post #7 of 14
--- On Sun, 6/1/08, Matt S Trout <dbix-class [at] trout> wrote:
Re: RT #36209: convert internal path seperators for clarity
[In reply to]
> From: Matt S Trout <dbix-class [at] trout>
> Subject: Re: [Catalyst-dev] RT #36209: convert internal path seperators for clarity
> To: "Development of the elegant MVC web framework" <catalyst-dev [at] lists>
> Date: Sunday, June 1, 2008, 3:12 AM
> On Sat, May 31, 2008 at 08:58:38AM -0400, Hans Dieter
> Pearcey wrote:
> > On Thu, May 29, 2008 at 09:35:57AM -0700, J. Shirley
> > > > $c->forward('Foo::bar') for
> > > >
> > >
> > > That seems by far to make the most sense, and
> really should clarify things.
> > It will un-clarify any controller that changes
> Well ... not really. I think it would simply ignore
> Perhaps better would be 'Foo->bar', then the
> code basically becomes
> my $action = $c->controller(split('->',
> I can see only two reasons for wanting to change the
> private path:
> (1) in Root.pm to provide base /begin /auto and /end
> actions for the whole app
> (2) to split a large controller up into several but still
> Maybe we should look at finding a way to handle these cases
> that's saner.
I've always felt iffy about namespace being part of the controller class in this way. The examples you gave (regarding /auto, etc and partitioning controllers) are the only ones I can think of as well. However I have to wonder if this is too much tying of information to a controller? I guess the fundamental question I have is if a controller should know it's namespace, or if that attribute should be assigned to it from from external class or process. From my thinking a controller class should only know enough about itself to work, everything else should be passed into it from the dispatcher or from some sort of adapter class that 'wraps' it for consumption via the dispatching mechanism. So I guess I am wondering if we are at the proper level of abstraction here?
> I'm pretty sure the private namespace is basically
> useless for anything else
> (yes, uri_for uses it, but any code that uses uri_for
> without either an action
> object or an absolute URL is basically broken and the new
> methods shouldn't need it at all).
> > Are there any other cases where private path names
> don't match $package ::
> > $methodname?
> Not that I can think of.
> Matt S Trout Need help with your Catalyst or
> DBIx::Class project?
> Technical Director
> Shadowcat Systems Ltd. Want a managed development or
> deployment platform?
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
Catalyst-dev mailing list
Catalyst-dev [at] lists