-
-
27 Feb 2006 23:42:21 UTC
- Distribution: DBIx-Class-Loader
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (3)
- Testers (459 / 466 / 1)
- Kwalitee
Bus factor: 4- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (12.68KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- DBI
- DBIx::Class
- Lingua::EN::Inflect
- Test::More
- Text::Balanced
- UNIVERSAL::require
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
DBIx::Class::Loader::Writing - Loader subclass writing guide
SYNOPSIS
package DBIx::Class::Loader::Foo; # THIS IS JUST A TEMPLATE TO GET YOU STARTED. use strict; use base 'DBIx::Class::Loader::Generic'; use Carp; sub _db_classes { return qw/DBIx::Class::PK::Auto::Foo/; # You may want to return more, or less, than this. } sub _tables { my $self = shift; my $dbh = $self->{storage}->dbh; return $dbh->tables; # Your DBD may need something different } sub _table_info { my ( $self, $table ) = @_; ... return ( \@cols, \@primary ); } sub _relationships { my $self = shift; ... $self->_belongs_to_many($table, $f_key, $f_table, $f_column); # For each relationship you want to set up ($f_column is # optional, default is $f_table's primary key) ... }
Module Install Instructions
To install DBIx::Class::Loader, copy and paste the appropriate command in to your terminal.
cpanm DBIx::Class::Loader
perl -MCPAN -e shell install DBIx::Class::Loader
For more information on module installation, please visit the detailed CPAN module installation guide.