On Wed, Nov 3, 2010 at 7:40 AM, Jonathon Soong <[email protected]> wrote: > Hi > >> What kind of code do you actually want to run? >> Perhaps it would be smarter to put that code into the model and then >> run a perl script from cron that makes use of that model thus >> bypassing the HTML authentication (which might be ok considering the >> code is run from the system) > > 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 > > > _______________________________________________ > 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/ > >
1) put code in an app independent module, your model uses that module and so can you. 2) http://search.cpan.org/~petdance/WWW-Mechanize-1.66/lib/WWW/Mechanize.pm ... oh and what Octavian said. _______________________________________________ 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/
