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 <[EMAIL PROTECTED]> [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/

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to