The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::Continuation - Pseudo-continuation objects for Catalyst

SYNOPSIS

    $c->cont("foo");

DESCRIPTION

This object is returned by the "cont" in Catalyst::Plugin::Continuation method. It captures the current state of execution within the context object as best as it can, within the limitations perl and Perl.

Please do not try to construct it directly.

METHODS

new %attrs

Create a continuation

new_from_store

Restore a continuation. Takes a value as returned by as_hashref. Requires the $c object to be specified.

as_hashref

Returns a hash ref that can be serialized. This is required for serialization due to the fact that $c is different between requests.

as_deep_hashref

Create the structure that shadows $c's fields. Suitable for passing to _localize_fields.

id

The ID of this continuation.

execute

Invoke the continuation, localizing the whole $c object to what it was when the continuation was created, and calling the ->forward.

See also forward_to_caller for what happens once this is done.

uri

This method will return a URI that will cause the continuation to be reinvoked.

It automatically calls save_in_store, in order to allow this continuation to be invoked from different requests.

save_in_store

This method causes the continuation to ask the $c object to save it somewhere. This is handled by Catalyst::Plugin::Continuation, and any overrides that may have been added.

delete_from_store

The inverse of saved_in_store.

method

Which method to invoke on $c as the continuation.

Defaults to forward.

forward

The argumetns to pass to method. This is an array reference, typically containing the string of the path to forward to.

forward_to_caller

Whether or not to ->forward back to the action that created the continuation. This defaults to true when a continuation is being restored from storage in a new request, and defaults to false otherwise.

When false nothing happens. When true defaults to a regular forward. When any string, invokes that method.

auto_delete

Whether or not a continuation should delete itself after being executed.

Defaults to true.

meta

This is thte Moose meta class instance for the continuation's class.

saved_in_store

c

These two fields are used internally to integrate the continuation with the current request.

SAVED FIELDS

These paramters contain the collected data. You may use this as a reference to find out what is saved/restored when a continuation is created/executed.

stash
action
namespace
request_parameters
request_arguments
request_path
request_match
request_action
state

These correspond to the methods/fields of $c.

caller

The last element on $c->stack