From: Rafael Kitover Date: Thu, 17 Nov 2011 23:08:11 +0000 (-0500) Subject: add notes about table object stringify to name X-Git-Tag: 0.07013~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-Schema-Loader.git;a=commitdiff_plain;h=3d58fd37b54a4b35f04232e703dba1265f7866b6 add notes about table object stringify to name Add notes to the POD for callbacks that the table object parameter stringifies to the unqualified table name, also add a note to the ::Table POD. --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 9d5292a..02ee05b 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -467,9 +467,9 @@ Exclude tables matching regex. Best specified as a qr// regex. 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 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. +(which stringifies to the unqualified table name) 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 @@ -497,7 +497,10 @@ passed, the code is called with arguments of 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), - } + } + +the L
stringifies to the +unqualified table name. =head2 rel_name_map @@ -688,8 +691,8 @@ L for a column. Must be a coderef that returns a hashref with the extra attributes. -Receives the L
, column name -and column_info. +Receives the L
(which +stringifies to the unqualified table name), column name and column_info. For example: diff --git a/lib/DBIx/Class/Schema/Loader/Table.pm b/lib/DBIx/Class/Schema/Loader/Table.pm index 46116aa..4f470dc 100644 --- a/lib/DBIx/Class/Schema/Loader/Table.pm +++ b/lib/DBIx/Class/Schema/Loader/Table.pm @@ -11,7 +11,8 @@ L =head1 DESCRIPTION -Inherits from L. +Inherits from L. Stringifies to +C<< $table->name >>. =head1 SEE ALSO