=head2 moniker_map
-Overrides the default table name to moniker translation. Can be either
-a hashref of table keys and moniker values, or a coderef for a translator
-function taking a single scalar table name argument and returning
-a scalar moniker. If the hash entry does not exist, or the function
-returns a false value, the code falls back to default behavior
-for that table name.
+Overrides the default table name to moniker translation. Can be either a
+hashref of table keys and moniker values, or a coderef for a translator
+function taking a L<table object|DBIx::Class::Schema::Loader::Table> argument
+and returning a scalar moniker. If the hash entry does not exist, or the
+function returns a false value, the code falls back to default behavior for
+that table name.
The default behavior is to split on case transition and non-alphanumeric
boundaries, singularize the resulting phrase, then join the titlecased words
{
table_class => name of the DBIC class we are building,
table_moniker => calculated moniker for this table (after moniker_map if present),
- table_name => name of the database table,
+ table => table object of interface DBIx::Class::Schema::Loader::Table,
full_table_name => schema-qualified name of the database table (RDBMS specific),
schema_class => name of the schema class we are building,
column_info => hashref of column info (data_type, is_nullable, etc),
Must be a coderef that returns a hashref with the extra attributes.
-Receives the table name, column name and column_info.
+Receives the L<table object|DBIx::Class::Schema::Loader::Table>, column name
+and column_info.
For example:
custom_column_info => sub {
- my ($table_name, $column_name, $column_info) = @_;
+ my ($table, $column_name, $column_info) = @_;
if ($column_name eq 'dog' && $column_info->{default_value} eq 'snoopy') {
return { is_snoopy => 1 };
Set to true to prepend the L</db_schema> to table names for C<<
__PACKAGE__->table >> calls, and to some other things like Oracle sequences.
+This attribute is automatically set to true for multi db_schema configurations.
+
=head2 use_moose
Creates Schema and Result classes that use L<Moose>, L<MooseX::NonMoose> and
other than English, you will want to turn off the English language specific
heuristics.
-To do so, use something like this in your laoder options:
+To do so, use something like this in your loader options:
naming => { monikers => 'v4' },
inflect_singular => sub { "$_[0]_rel" },
=head1 SEE ALSO
-L<DBIx::Class::Schema::Loader>
+L<DBIx::Class::Schema::Loader>, L<dbicdump>
=head1 AUTHOR