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.
mojo
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.
$tx
Mojo, Catalyst, Squatting::On::Catalyst, Pod::Server
John Beppu <beppu@cpan.org>
To install Squatting::On::Mojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Squatting::On::Mojo
CPAN shell
perl -MCPAN -e shell install Squatting::On::Mojo
For more information on module installation, please visit the detailed CPAN module installation guide.