[Catalyst] Re: Request paths - rejoining Chained actions together.
Matt S Trout
dbix-class at trout.me.uk
Thu May 29 06:44:31 BST 2008
On Mon, May 12, 2008 at 01:11:48AM +0100, Tomas Doran wrote:
>
> On 11 May 2008, at 15:17, Aristotle Pagaltzis wrote:
>
> >* Tomas Doran <bobtfish at bobtfish.net> [2008-05-11 10:05]:
> >>However, this does mean I now have 3 packages (a base class,
> >>and two controllers), where before I had one file..
> >
> >There’s nothing stopping you from putting them all in a single
> >file. :-)
>
> Now, I may be going mad - but this doesn't play for me..
>
> Make a test app, and add the following to the bottom of lib/MyApp/
> Controller/Root.pm:
> package MyApp::Controller::Foo;
That's not going to work.
That's not how my example worked.,
As I said before, Catalyst will treat the namespace corresponding to the
file and any -subnamespaces- as components to load.
Which is why my example was more like Controller/Foo.pm containing
MyApp::Controller::Foo::Child[123].
We don't go round ranbdomly instnatiating every package we find in any
file under Model/View/Controller - *that* would be a bug. Not doing so is
a feature :)
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list