On 6/11/02 12:46 PM, Perrin Harkins wrote: > John Hurst wrote: >> Still, I don't think that replacing this: >> >> <Location /search> >> SetHandler perl-script >> PerlHandler Controller::Search >> </Location> >> >> with this: >> >> [% Ctrl.Search() %] >> >> makes Controller::Search any less a controller. > > You're right. It just looks kind of odd to me, invoking a template for > something that is not a display-related task. It looks like the way > people typically do MVC in Mason or Embperl, with a first template that > doesn't do anything but invoke a module to take over the processing.
...but it has several advantages. I particularly appreciate being able to add to or change parameters or behaviors before passing things off to the controller, for example. I can have several "variants" of the same controller living at different URLs, all pointing back to a single controller object. Don't think of it as "invoking a template." Just think off it as an inverted dispatch mechanism: the actions camp out at their locations, as opposed to having their locations (in the httpd.conf) pointing at the controller modules. Or something... :) -John