| Tree-Persist documentation | Contained in the Tree-Persist distribution. |
Tree::Persist::DB - the base class for DB plugins for Tree persistence
This class is the base class for the Tree::Persist::DB::* hierarchy, which provides DB plugins for Tree persistence through Tree::Persist.
In addition to any parameters required by its parent Tree::Persist::Base, the following parameters are required by connect():
For any DB::* plugin to be used, the type must be 'DB' (case-sensitive).
This is the $dbh that is already connected to the right database and schema with the appropriate user. This is required.
This is the table name that contains the tree. This is required.
Please see the relevant section of Tree::Persist.
Please see the relevant section of Tree::Persist.
Rob Kinyon <rob.kinyon@iinteractive.com>
Stevan Little <stevan.little@iinteractive.com>
Thanks to Infinity Interactive for generously donating our time.
Copyright 2004, 2005 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 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__