From: "Jonathon Soong" <j...@investmentscience.com.au>
Yes I realise now it might make more sense in the Model, but at the moment it is in the Controller (it is someone else's code, so more difficult for me to refactor).

There are two questions I have then:
1. How do you call a Model's function from the command line?
2. Is there no way to call controller methods that require authentication?

Thanks


Jon


The model can be just a thin wrapper for your non-catalyst modules like MyApp::Model::DB could be for your DBIC schema. And you can use your non-catalyst module from a non-catalyst script that can be ran by a cron job.

If the code is in the controller and you can access it by web only, you can create a script that accesses your running Catalyst application, does the login (submits the login form with the necessary username and password), saves the cookie and resends that cookie for all the requests you need to do after logging in.

Octavian


_______________________________________________
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/

Reply via email to