Tree::Persist::DB - the base class for DB plugins for Tree persistence


Tree-Persist documentation Contained in the Tree-Persist distribution.

Index


Code Index:

NAME

Top

Tree::Persist::DB - the base class for DB plugins for Tree persistence

DESCRIPTION

Top

This class is the base class for the Tree::Persist::DB::* hierarchy, which provides DB plugins for Tree persistence through Tree::Persist.

PARAMETERS

Top

In addition to any parameters required by its parent Tree::Persist::Base, the following parameters are required by connect():

* type (required)

For any DB::* plugin to be used, the type must be 'DB' (case-sensitive).

* dbh (required)

This is the $dbh that is already connected to the right database and schema with the appropriate user. This is required.

* table (required)

This is the table name that contains the tree. This is required.

TODO

Top

CODE COVERAGE

Top

Please see the relevant section of Tree::Persist.

SUPPORT

Top

Please see the relevant section of Tree::Persist.

AUTHORS

Top

Rob Kinyon <rob.kinyon@iinteractive.com>

Stevan Little <stevan.little@iinteractive.com>

Thanks to Infinity Interactive for generously donating our time.

COPYRIGHT AND LICENSE

Top


Tree-Persist documentation Contained in the Tree-Persist distribution.

package Tree::Persist::DB;

use strict;
use warnings;

use base qw( Tree::Persist::Base );

our $VERSION = '1.00';

sub _init {
    my $class = shift;
    my ($opts) = @_;

    my $self = $class->SUPER::_init( $opts );

    $self->{_dbh} = $opts->{dbh};
    $self->{_table} = $opts->{table};

    return $self;
}

1;
__END__