GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CATALYST::MODEL::CDBI::PLAIN (3)

.ds Aq ’

NAME

Catalyst::Model::CDBI::Plain - A Plain base class for Class::DBI models

CONTENTS

SYNOPSIS



    # set up your CDBI classes within Catalyst: base class
    package Music::Model::DBI;
    use base Catalyst::Model::CDBI::Plain;
    __PACKAGE__->connection(dbi:mysql:music, user, pw);

    # One class, inherits from base, sets up relationships
    package Music::Model::Artist;
    use base Music::Model::DBI;
    __PACKAGE__->table(artist);
    __PACKAGE__->columns(All => qw/artistid name/);
    __PACKAGE__->has_many(cds => Music::Model::CD);

    # etc.

    # OR

    # use existing CDBI classes within Catalyst:
    package MyApp::Model::Artist; # a Catalyst class
    use base qw[Catalyst::Model::CDBI::Plain Some::Other::Artist];
    1; # Thats it--Some::Other::Artist is in Catalyst as MyApp::Model::Artist

    # OR

    package MyApp::Model::Library;
    use base qw[MyApp::Model::DBI Class::DBI::mysql]; # add MySQL-specific methods
    __PACKAGE__->set_up_table(library); # from CDBI::mysql



DESCRIPTION

Catalyst::Model::CDBI::Plain is a Model class for Catalyst to be used with user-specified Class::DBI classes. It does not automatically set anything up or create relationships; this is left to the user. This module can be used with existing Class::DBI classes, so that they can be used with Catalyst, or as a way of writing CDBI-based Model classes within Catalyst.

    METHODS

new Overrides the constructor to create a Catalyst::Base object, rather than a CDBI object.

AUTHOR

Jesse Sheidlower <jester@panix.com>

Christian Hansen <ch@ngmedia.com>

THANKS TO

Marcus Ramberg, Sebastian Riedel

SUPPORT

IRC
#catalyst on irc.perl.org

Mailing-Lists:
http://lists.rawmode.org/mailman/listinfo/catalyst
http://lists.rawmode.org/mailman/listinfo/catalyst-dev

TODO Real tests

LICENSE

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

SEE ALSO

Catalyst

Class::DBI

Catalyst::Model::CDBI

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CATALYST::MODEL::CDBI::PLAIN (3) 2005-11-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.