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

NAME

Solstice::Service - Superclass for all services. A service provides request-lifecycle-long caching of information.

SYNOPSIS

  use base qw(Solstice::Service);

  sub new {
    my $obj = shift;
    return $obj->SUPER::new(@_);
  }

DESCRIPTION

Creates an API for subclasses to use to manage and make available global data.

Export

No symbols exported.

Methods

new()

Creates a new Solstice::Service object.

setNamespace($str)

Sets the namespace on a per-object basis.

getNamespace()

Return the current namespace

getValue($str)

Returns the entity tied to the given key, in this namespace. The namespace is defined as the name of the derived subclass with the pid of the apache thread.

setValue($str, $str)

Will store the value entity, tied to the key in our namespace. The namespace is defined as the name of the derived subclass with the pid of the apache thread.

get()

Alias for getValue().

set()

Alias for setValue().

Private Methods

_getDataStore()

Return the global datastore hashref.

_getClassName()

Returns the result of ref($self). This can be overridden in a subclass to eliminate the ref(), by just returning a string containing the package name. Be careful when overriding this method in superclasses!

_getKeyname()

Returns a generated string for use as a hash key in the object's datastore.

AUTHOR

Catalyst Group, <catalyst@u.washington.edu>

VERSION

$Revision: 3364 $

COPYRIGHT

Copyright 1998-2007 Office of Learning Technologies, University of Washington

Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.