Starch::Manager - Entry point for accessing Starch state objects.
This module provides a generic interface to managing the storage of state data.
Typically you will be using the Starch module to create this object.
This class supports method proxies as described in "METHOD PROXIES" in Starch::Manual.
The Starch::Store storage backend to use for persisting the state data.
A hashref must be passed and it is expected to contain at least a
class key and will be converted into a store object automatically.
class can be fully qualified,
or relative to the
:: signifies that the store's package name is relative.
More information about stores can be found at "STORES" in Starch::Manual.
The underlying Starch::Factory object which manages all the plugins and state/store object construction.
This argument is automatically set when calling
new on Starch.
a state should live after the last time it was modified.
60 * 60 * 2 (2 hours).
See "EXPIRATION" in Starch::Manual for more information.
Which plugins to apply to the Starch objects,
specified as an array ref of plugin names.
The plugin names can be fully qualified,
or relative to the
:: signifies that the plugin's package name is relative.
Plugins can modify nearly any functionality in Starch. More information about plugins, as well as which plugins are available, can be found at "PLUGINS" in Starch::Manual.
The root array ref namespace to put starch data in.
In most cases this is just prepended to the state ID and used as the key for storing the state data.
If you are using the same store for independent application states you may want to namespace them so that you can easly identify which application a particular state belongs to when looking in the store.
The state key to store the "expires" in Starch::State value in.
The state key to store the "modified" in Starch::State value in.
The state key to store the "created" in Starch::State value in.
This key is used by stores to mark state data as not to be stored.
This key is used to artificially mark as state as dirty by incrementing the value of this key. Used by "mark_dirty" in Starch::State.
my $new_state = $starch->state(); my $existing_state = $starch->state( $id );
If no ID is specified, or is undef, then an ID will be automatically generated.
Additional arguments can be passed after the ID argument. These extra arguments will be passed to the state object constructor.
Returns a fairly unique string used for seeding "id" in Starch::State.
Generates and returns a new state ID which is a SHA-1 hex digest of calling "state_id_seed".
Given two bits of data (scalar, array ref, or hash ref) this returns true if the data is different. Used internally by "is_dirty" in Starch::State.