GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Squatting::On::Catalyst(3) User Contributed Perl Documentation Squatting::On::Catalyst(3)

Squatting::On::Catalyst - embed a Squatting app into a Catalyst app

Add these 4 lines to your Catalyst app's Root Controller to embed a Squatting App.

  use App 'On::Catalyst'
  App->init;
  App->relocate('/somewhere')
  sub somewhere : Local { App->catalyze($_[1]) }

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

App->catalyze($c)

This method takes a Catalyst object, and uses the information it contains to let the Squatting app handle one HTTP request. First, it translates the Catalyst::Request object into terms Squatting can understand. Then it lets the Squatting app handle the request. Finally, it takes the Squatting app's output and populates the Catalyst::Response object. When this method is done, the Catalyst object should have everything it needs to send back a complete HTTP response.

NOTE: If you want to communicate something from the Catalyst app to the Squatting app, you can put data in $c->stash or $c->session before calling catalyze(). From inside a Squatting controller, these can be accessed via $self->v and $self->state. Squatting controllers also get access to Catalyst's logging object via $self->log.

In summary:

  Catalyst                              Squatting
  --------                              ---------
  $c->stash                             $self->v
  $c->session                           $self->state
  $c->log                               $self->log

Catalyst, Catalyst::Request, Catalyst::Response
2013-01-23 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.