NAME
Modwheel::DB - Abstract factory class for Modwheel database drivers.
VERSION
v0.2.2
SYNOPSIS
my $db = Modwheel::DB->new({ modwheel => $modwheel });
$db->connect or die "Couldn't connect to database: " . $db->errstr;
# [ ...do something with the database here... ]
$db->disconnect if $db->connected;
DESCRIPTION
This class is just a wrapper for database driver classes.
MORE INFORMATION
See Modwheel::DB::Base instead.
SUBROUTINES/METHODS
CONSTRUCTOR
Modwheel::DB->new({modwheel => $modwheel})
-
This function creates a DB class based on the current database type. The database type is selected from the configuration entry
Site: $MySiteName: database: type: $MyDatabaseType
So if
$MyDatabaseType
is MySQL, the object returned by->new( )
is actually a Modwheel::DB::MySQL object.This way we can support different database systems for each instance.
CONFIGURATION AND ENVIRONMENT
See the database
directive in Modwheel::Manual::Config
DEPENDENCIES
It requires the module you have specified as database type in the configuration.
INCOMPATIBILITIES
None known at this moment.
BUGS AND LIMITATIONS
If you have a module that doesn't include '::' in the name, it will add Modwheel::Template:: to the name.
SEE ALSO
The README included in the Modwheel distribution.
The Modwheel website: http://www.0x61736b.net/Modwheel/
DIAGNOSTICS
Be sure that the module specified in the database:type: section of the coniguration file is installed and is loadable.
If the module name includes the characters '::', it will use the full module name, if it doesn't it will add Modwheel::DB:: to the front of the name. So if the module name is:
MyCompany::OurDB::ModwheelSupport
it will load that module. If the name is PostgreSQL however, it will load:
Modwheel::DB::PostgreSQL
AUTHOR
Ask Solem, ask@0x61736b.net.
LICENSE AND COPYRIGHT
Copyright (C) 2007 by Ask Solem ask@0x61736b.net
.
All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.