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

NAME

App::ValueDomain - Interface for sharing data between processes

SYNOPSIS

    use App;

    $context = App->context();
    $dom = $context->service("ValueDomain");
    $dom = $context->value_domain();

DESCRIPTION

A ValueDomain service represents a single hash in which scalars or deep references may be stored (basically an MLDBM).

Class Group: ValueDomain

The following classes might be a part of the ValueDomain Class Group.

  • Class: App::ValueDomain

  • Class: App::ValueDomain::SharedDatastore

  • Class: App::ValueDomain::Repository

Class: App::ValueDomain

A ValueDomain service represents an array of values and the labels by which those values may be displayed.

 * Throws: App::Exception::ValueDomain
 * Since:  0.01

Public Methods:

values()

    * Signature: $values = $dom->values();
    * Signature: $values = $dom->values($values_string);
    * Param:     $values_string     string
    * Return:    $values            HASH
    * Throws:    App::Exception::ValueDomain
    * Since:     0.01

    Sample Usage: 

    $context = App->context();
    $dom = $context->value_domain("product_type");
    $values = $dom->values();
    print @$values, "\n";

labels()

    * Signature: $labels = $dom->labels();
    * Signature: $labels = $dom->labels($values_string);
    * Param:     $values_string     string
    * Return:    $labels            HASH
    * Throws:    App::Exception::ValueDomain
    * Since:     0.01

    Sample Usage: 

    $context = App->context();
    $dom = $context->value_domain("product_type");
    $labels = $dom->labels();
    print %$labels, "\n";

values_labels()

    * Signature: ($values, $labels) = $dom->values_labels();
    * Signature: ($values, $labels) = $dom->values_labels($values_string);
    * Param:     $values_string     string
    * Return:    $values            HASH
    * Return:    $labels            HASH
    * Throws:    App::Exception::ValueDomain
    * Since:     0.01

    Sample Usage: 

    $context = App->context();
    $dom = $context->value_domain("product_type");
    ($values, $labels) = $dom->values_labels();
    foreach $value (@$values) {
        print "$value => $labels->{$value}\n";
    }

_load()

The _load() method is called to get the list of valid values in a data domain and the labels that should be used to represent these values to a user.

    * Signature: $self->_load()
    * Signature: $self->_load($values_string)
    * Param:     $values_string    string
    * Return:    void
    * Throws:    App::Exception
    * Since:     0.01

    Sample Usage: 

    $self->_load();

Protected Methods:

service_type()

Returns 'ValueDomain';

    * Signature: $service_type = App::ValueDomain->service_type();
    * Param:     void
    * Return:    $service_type  string
    * Since:     0.01

    $service_type = $sdata->service_type();

ACKNOWLEDGEMENTS

 * Author:  Stephen Adkins <stephen.adkins@officevision.com>
 * License: This is free software. It is licensed under the same terms as Perl itself.

SEE ALSO

App::Context, App::Service