NAME

Siesta::DBI - base class extending Class::DBI

DESCRIPTION

most things in the system will be a subclass of Siesta::DBI, giving

METHODS

load_alias( $name )

Sets the load_alias of a class to be $name. This is used in conjunction with ->load to provide a shortcut to a serialised item.

load( $id_or_name )

Attempt to retrieve an object using either it's well-known name or the row id.

It's used like so:

package User;
use base 'Siesta::DBI';
__PACKAGE__->load_alias( 'email' );

# time passes ...
my $user =  User->load( 'jay@front-of.quick.stop';

init_db

run the database creation script that lives in __DATA__