[Catalyst] Access controllor logic from script

Juan Camacho jc5826 at gmail.com
Sun Jan 22 15:01:14 CET 2006

Is it possible access logic inside a controller from a Perl command
line script?  For example, run the 'records' method below:

package MyApp::C::Search;

sub records {
  my ($self, $c) = @_
  ... logic here that uses $c->req->params & $c->stash

I solved this by moving the logic to it's own Catalyst agnostic
module, but I'm curious if there might have been a better way and the
answer may have an impact on how I design my code in the future.

More information about the Catalyst mailing list