On Mar 20, 2008, at 12:12 PM, Devin Austin wrote:
I was playing around the other day when I tried to create a simple
controller with out using the Catalyst.pl helper script. It wasn't
loaded when I restarted my devel server, so I figured that there
must be a dispatch table somewhere storing the names of the
Controller files, and that table is edited by the helper script.
Is this correct? Or is there some other method used to create
controllers? Also, does one *have* to use the helper script to
create controllers/models/views?
There's no dispatch table outside of the Controller tree. You don't
have to use the helpers at all but you do have to include an
attribute declaration for actions to be found. Making a controller of
Foo.pm with an action of bar-
This won't be found-
sub bar {}
This will be (at /foo/bar)-
sub bar : Local {}
You also don't need to manually restart the dev server if you launch
it with the -r flag. It will pick-up changes in your tree and restart
for you.
One of the main advantages, to me, of the helpers is that they stub
tests for you.
-Ashley
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/