NAME
Catalyst::Model::Oryx - Oryx model component for Catalyst
SYNOPSIS
# with the helper
script/create.pl model Oryx Oryx
# define your storage class by hand
package
CMS::M::Oryx;
__PACKAGE__->config(
dsname
=>
'dbi:Pg:dbname=mydb'
,
usname
=>
'jrandom'
passwd
=>
'70p53cr37'
);
1;
# define a persistent class
package
CMS::M::Document;
our
$schema
= {
attributes
=> [{
name
=>
'author'
,
type
=>
'String'
,
}],
associations
=> [{
role
=>
'paragraphs'
,
type
=>
'Array'
,
}]
};
1;
# use your persistent class
$doc
= CMS::M::Document->create({
author
=>
'Some Clever Guy'
,
});
DESCRIPTION
This module implements an Oryx object persistence model component for the Catalyst application framework. See Oryx and Oryx::Class for details on how to use Oryx.
METHODS
- new
-
Constructor and calls the
connect
method which it inherits from Oryx. If you've used the helper script to install the Oryx model, then DBM::Deep will be used by default with thedatapath
set to '/tmp' - this can be useful for easily testing your persistent objects without the need to do any RDBMS setup.
AUTHOR
Richard Hundt <richard NO SPAM AT protea-systems.com>
SEE ALSO
LICENCE
This module is free software and may be used under the same terms as Perl itself.