NAME
Tree::Persist::File - The base class for File plugins for Tree persistence
SYNOPSIS
See "SYNOPSIS" in Tree::Persist or scripts/xml.demo.pl for sample code.
DESCRIPTION
This class is a base class for the Tree::Persist::File::* hierarchy, which provides File plugins for Tree persistence.
PARAMETERS
Parameters are used in the call to "connect({%opts})" in Tree::Persist or "create_datastore({%opts})" in Tree::Persist.
In addition to any parameters required by its parent Tree::Persist::Base, the following parameters are used by connect()
or create_datastore()
:
class (optional)
This is the name of a user-supplied class for deflation/inflation.
The
class
parameter takes precedence over thetype
parameter.If
class
is not provided,type
is used, and defaults to 'File'. Thenclass
is determined using:$class = $type eq 'File' ? 'Tree::Persist::File::XML' : 'Tree::Persist::DB::SelfReferential';
See t/save_and_load.t for sample code.
filename (required)
This is the filename that will be used as the datastore.
type (optional)
For any File::* plugin to be used, the type must be 'File' (case-sensitive) unless a
class
is provided.
METHODS
Tree::Persist::File is a sub-class of Tree::Persist::Base, and inherits all its methods.
TODO
Currently, the filename parameter isn't checked for validity or existence.
CODE COVERAGE
Please see the relevant section of Tree::Persist.
SUPPORT
Please see the relevant section of Tree::Persist.
AUTHORS
Rob Kinyon <rob.kinyon@iinteractive.com>
Stevan Little <stevan.little@iinteractive.com>
Thanks to Infinity Interactive for generously donating our time.
Co-maintenance since V 1.01 is by Ron Savage <rsavage@cpan.org>. Uses of 'I' in previous versions is not me, but will be hereafter.
COPYRIGHT AND LICENSE
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.