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

NAME

Pangloss::Application::Base - base class for application objects.

SYNOPSIS

  # abstract class - cannot be used directly
  use base qw( Pangloss::Application::Base );

  sub foo {
      my $self = shift;
      $self->parent;
      $self->store;
      my $obj = $self->get_or_create_stored_obj( $key, $class );
      $self->save( $obj );
  }

DESCRIPTION

This is a base class for all application objects.

METHODS

$obj->parent

set/get the parent application.

$obj->store

set/get the parent's store.

$abc = $obj->get_or_create_stored_obj( $key, $class )

gets or creates an object bound to $key from the store. calls $class->new and stores the result if no object is found in the store.

$obj->save( $abc )

save this object in the store.

AUTHOR

Steve Purkis <spurkis@quiup.com>

SEE ALSO

Pangloss::Application