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


Manual Reference Pages  -  SQUATTING::ON::CATALYST (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS

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]) }



DESCRIPTION

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.

API

    All Your Framework Are Belong To Us

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.

<B>NOTEB>: 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



SEE ALSO

Catalyst, Catalyst::Request, Catalyst::Response
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SQUATTING::ON::CATALYST (3) 2013-01-23

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