Name

CatalystX::Usul::Model::Schema - Base class for database models

Version

0.3.$Revision: 583 $

Synopsis

package YourApp::Model::YourModel;

use base qw(CatalystX::Usul::Model::Schema);

__PACKAGE__->config
   ( connect_info => [],
     database     => q(library),
     schema_class => q(YourApp::Schema::YourSchema) );

sub new {
   my ($class, $app, @rest) = @_;

   my $database = $rest[0]->{database} || $class->config->{database};

   $class->config( connect_info
                      => $class->connect_info( $app, $database ) );

   return $class->next::method( $app, @rest );
}

Description

Aggregates the methods from the three classes it inherits from

Subroutines/Methods

build_per_context_instance

Adds the attributes from CatalystX::Usul::Model to the ones from Catalyst::Model::DBIC::Schema

connect_info

Calls parent method to obtain dsn, user and password information from configuration file before instantiating the database classes

Diagnostics

None

Configuration and Environment

None

Dependencies

Catalyst::Model::DBIC::Schema
CatalystX::Usul::Model
CatalystX::Usul::Schema

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2008 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE