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

NAME

OpenFrame::SlotStore - general storage for slot data

SYNOPSIS

    use OpenFrame::SlotStore;

    my $store = OpenFrame::SlotStore->new();

    $store->set($something);

    $thing = $store->get('Some::Thing::Class');

DESCRIPTION

This module implements a general storage faciity which keeps track of the objects returned by OpenFrame slots.

METHODS

get()

The get() method takes a class name as a string, and returns an object of that class if it exists within the store or undef if not.

set()

The set() method takes one parameter, any object. This object is stored under its class name and is available for use from any other slot. If an object of a class that is already stored is placed in the slot store the old object is overwritten.

response()

The set() method makes special note of any object stored which is an object of the OpenFrame::Response class. This can then be retrieved via the response() method. This is implemented as an optimisation for the OpenFrame::Slot class which uses this method to determine when a slot has generated a response which requires the remaining slot list to be short-circuited.

NOTES

The slot store also keeps a copy of itself, so if you make a request for OpenFrame::SlotStore in your paramter list returned from what() then you can get access to everything in the store.

AUTHORS

James A. Duncan <jduncan@fotango.com> with minor changes from Andy Wardley <abw@kfs.org>

COPYRIGHT

Copyright (C) 2001-2, Fotango Ltd.

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.