
Squatting::On::Mojo - squat on top of Mojo

First, Create a Mojo app:
mojo generate app Foo
Then, Embed a Squatting app Into It:
cd foo
$EDITOR lib/Foo.pm
use Pod::Server 'On::Mojo';
Pod::Server->init;
sub handler {
my ($self, $tx) = @_;
Pod::Server->mojo($self, $tx);
$tx;
}

The purpose of this module is to allow Squatting apps to be embedded inside Mojo apps. This is done by adding a mojo method to the Squatting app that knows how to translate between Mojo and Squatting. To use this module, pass the string 'On::Mojo' to the use statement that loads your Squatting app.

Calling the mojo method will let the Squatting app handle the request. The $tx should have its Mojo::Message::Response object populated by Squatting, and $tx should be ready to return when finished.

Mojo, Catalyst, Squatting::On::Catalyst, Pod::Server

John Beppu <beppu@cpan.org>