On 04/11/2011 06:30 PM, Charlie Garrison wrote:
Good evening,
Hmm, the documentation is a bit sparse; I can't see how to get $c (or
$app). I can't see anything in the test files either which show how to
get the app object. Do you have an example you could share?
Or should I just start the embeddable instance and then do a
handle_request to process the email sending?
Good evening,
On 11/04/11 at 10:34 AM +0930, Jon Schutz wrote:
Perhaps fire up your app from the cron job using
Catalyst::Engine::Embeddable?
Thanks, didn't know about that one; I'll have a look.Perhaps fire up your app from the cron job using
Catalyst::Engine::Embeddable?
Hmm, the documentation is a bit sparse; I can't see how to get $c (or
$app). I can't see anything in the test files either which show how to
get the app object. Do you have an example you could share?
Or should I just start the embeddable instance and then do a
handle_request to process the email sending?
use strict;
use warnings;
use HTTP::Request;
BEGIN {
$ENV{CATALYST_ENGINE} = 'Embeddable';
}
require MyApp;
my $response;
MyApp->handle_request(HTTP::Request->new('GET',
'http://localhost/send/email'), \$response);