- REQUIRED ARGUMENTS
- OPTIONAL ARGUMENTS
- COPYRIGHT AND LICENSE
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.
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
Starch::Store namespace. A leading
:: signifies that the store's package name is relative.
More information about stores can be found at "STORES" in Starch.
How long, in seconds, a state should live after the last time it was modified. Defaults to
60 * 60 * 2 (2 hours).
See "EXPIRATION" in Starch 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
Starch::Plugin namespace. A leading
:: 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.
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. Defaults to
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. Defaults to
The state key to store the "modified" in Starch::State value in. Defaults to
The state key to store the "created" in Starch::State value in. Defaults to
This key is used by stores to mark state data as not to be stored. Defaults to
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.
The Starch::Factory object which applies plugins and handles the construction of the manager, state, and store objects.
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.
See "SUPPORT" in Starch.
See "AUTHORS" in Starch.