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
Gantry::State::Simple(3) User Contributed Perl Documentation Gantry::State::Simple(3)

Gantry::State::Simple - A simple state machine for Gantry

This module implements a simple state machine to control the execution context within GantryXs handler() method.

When a request comes into Gantry a preXdetermined set of steps are executed. These preXdetermined steps can be termed "states", and the process can be called a "state machine". There are many ways to implement a "state machine", so this document will not get into the semantics of the term.

What this module does, is allow plugins to issue a redirect and have them take effect immediately. The default behavior is to have the redirect happen after the controllers have finished processing.

This is to allow a plugin to initialize properly. For example Gantry::Plugins::Session requires a redirect to /cookiecheck to see if the session cookie has been set. Under the default state handler, this redirect happens after the initial controller has finished processing.

So a race condition happens. You can not manipulate a session until the cookie has been established which doesn't happen until after the initial controller executes. This problem goes away after the redirect.

This module fixes the problem.

To load a differant state machine you need to do the following:

use MyApp qw{ XStateMachine=Simple };

 Gantry
 Gantry::State::Default
 Gantry::State::Constants

Kevin L. Esteb <kesteb@wsipc.org>

Copyright (C) 2008 Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

Hey! The above document had some coding errors, which are explained below:
Around line 407:
Non-ASCII character seen before =encoding in 'GantryXs'. Assuming UTF-8
2022-04-07 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.