Improve moniker_map coderef documentation (GH#7)
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / Base.pm
index 3ff501a..a0b252d 100644 (file)
@@ -412,7 +412,7 @@ L<might_have|DBIx::Class::Relationship/might_have> relationships, they default
 to off.
 
 Can also be a coderef, for more precise control, in which case the coderef gets
-this hash of parameters (as a list:)
+this hash of parameters (as a list):
 
     rel_name        # the name of the relationship
     rel_type        # the type of the relationship: 'belongs_to', 'has_many' or 'might_have'
@@ -613,14 +613,27 @@ a hashref of unqualified table name keys and moniker values
 
 =item *
 
-a coderef for a translator function taking a L<table
-object|DBIx::Class::Schema::Loader::Table> argument (which stringifies to the
-unqualified table name) and returning a scalar moniker
+a coderef that returns the moniker, which is called with the following
+arguments:
 
-The function is also passed a coderef that can be called with either
-of the hashref forms to get the moniker mapped accordingly.  This is
-useful if you need to handle some monikers specially, but want to use
-the hashref form for the rest.
+=over
+
+=item *
+
+the L<DBIx::Class::Schema::Loader::Table> object for the table
+
+=item *
+
+the default moniker that DBIC would ordinarily give this table
+
+=item *
+
+a coderef that can be called with either of the hashref forms to get
+the moniker mapped accordingly.  This is useful if you need to handle
+some monikers specially, but want to use the hashref form for the
+rest.
+
+=back
 
 =back
 
@@ -643,7 +656,7 @@ together. Examples:
 
 Map for overriding the monikerization of individual L</moniker_parts>.
 The keys are the moniker part to override, the value is either a
-hashref of coderef for mapping the corresponding part of the
+hashref or coderef for mapping the corresponding part of the
 moniker. If a coderef is used, it gets called with the moniker part
 and the hash key the code ref was found under.