# Generated by Pod::WikiDoc version 0.17

=pod

=head1 NAME

Class::Dot::Model - Simple way of defining models for DBIx::Class.

=head1 VERSION

This document describes Class::Dot::Model version v%%VERSION%%

=head1 SYNOPSIS

     package My::Model;
     use Class::Dot::Model   domain => 'org.mydomain.myapp';
 
     package My::Model::Cat;
     use Class::Dot::Model::Table qw(:has_many);
 
     Table       'cats';
     Columns     qw( id gender dna action colour );
     Primary_Key 'id';
     Has_Many    'memories'
         => 'My::Model::Cat::Memory';
 
 
     package My::Model::Cat::Memory;
     use Class::Dot::Model::Table qw(:belongs_to);
 
     Table       'memory';
     Columns     qw( id cat content );
     Primary_Key 'id';
     Belongs_To  'cat'
         => 'My::Model::Cat';
 
     package main;
 
     my $model = My::Model->new();

=head1 DESCRIPTION

A module for making DBIx::Class even simpler.

=head1 SUBROUTINESE<sol>METHODS

None of this modules functions should be used directly.

=head2 PRIVATE CLASS METHODS

=head3 C<<< _create_dsn_with_config($config) >>>

=for apidoc string = Class::Dot::Model::_create_dsn_with_config(HASHREF $config)

Create a DBI DSN out of a configuration hash.

=head3 C<<< _install_constructor($call_class, $dsn, $config) >>>

=for apidoc CODEREF = Class::Dot::Model::_install_constructor(_CLASS $call_class, string $dsn, HASHREF $config)

Create an install a CE<lt>newE<gt> function into the callers namespace. This new
function is responsible for connecting to the database etc.

The property is a string.

=head3 C<<< _load_dbconfig($config_domain, $config_host) >>>

=for apidoc CODEREF = Class::Dot::Model::_load_dbconfig(string $config_domain, string $config_host)

Load the database configuration using a L<Config::PlConfig> host and domain.

=head2 PRIVATE SUBROUTINES

=head3 C<<< requires() >>>

Used by LE<lt>Class::Dot::Model::PreloadE<gt> to know which modules this module
requires.

=head1 DIAGNOSTICS

None.

=head1 CONFIGURATION AND ENVIRONMENT

This module uses L<Config::PlConfig> to load configuration if a domain is given
as import argument.

=head1 DEPENDENCIES

=over

=item *

L<DBIx::Class>

=back

=over

=item *

L<Class::Dot>

=back

=over

=item *

L<Class::Plugin::Util>

=back

=over

=item *

L<Params::Util>

=back

=over

=item *

L<Config::PlConfig>

=back

=over

=item *

L<version>

=back

=head1 INCOMPATIBILITIES

None known.

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
L<bug-class-dot-model@rt.cpan.org|mailto:class-dot-model@rt.cpan.org>, or through the web interface at
L<CPAN Bug tracker|http://rt.cpan.org>.

=head1 SEE ALSO

=head2 L<DBIx::Class>

=head2 L<Class::Dot::Model::Table>

=head2 L<Class::Dot>

=head1 AUTHOR

Ask Solem, L<ask@0x61736b.net>.

=head1 LICENSE AND COPYRIGHT

Copyright (c), 2007 Ask Solem L<ask@0x61736b.net|mailto:ask@0x61736b.net>.

All rights reserved.

This library is free software; you can redistribute it andE<sol>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.

=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS ANDE<sol>OR OTHER PARTIES PROVIDE THE
SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ANDE<sol>OR REDISTRIBUTE THE
SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER
SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.



# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 78
# End:
# vim: expandtab tabstop=4 shiftwidth=4 shiftround
