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

NAME

Pangloss::Application::View - current view of the application model.

SYNOPSIS

  use Pangloss::Application::View;
  my $view = new Pangloss::Application::View();

  # use it as a hash

DESCRIPTION

Simple hash so we can put views in the store.

Currently we're using direct-variable access (ie: regular perl hash), eventually these vars should live behind accessors.

ATM, Pangloss::Application::CollectionEditor does most of the populating.

KNOWN KEYS

errors

The list of error objects.

users_collection, languages_collection, categories_collection, concepts_collection, terms_collection

The named Pangloss::Collection object.

users, languages, categories, concepts, terms,

The list() of Pangloss objects in the named Pangloss::Collection (this is a handy shortcut for Petal templates).

user, category, concept, term, language

The currently selected Pangloss object (ie: Pangloss::User, etc).

The following keys are added as needed:

    error    - associated error object
    added    - true if the pangloss object was added
    removed  - true if the pangloss object was removed
    modified - true if the pangloss object was modified
add, get, modify, remove

The hash of actions performed, which is added to as needed:

    user       Pangloss::User
    language   Pangloss::Language
    concept    Pangloss::Concept
    category   Pangloss::Category
    term       Pangloss::Term

This lets you chain things like this:

    $view->add->{user}->{error}
    $view->add->{user}->{added}

And so on.

NOTES

Everything here is cloned, so you don't have to worry about modifying the original stored object (use Pangloss::Application to do that).

AUTHOR

Steve Purkis <spurkis@quiup.com>

SEE ALSO

Pangloss::Application