X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FCookbook.pod;fp=lib%2FDBIx%2FClass%2FManual%2FCookbook.pod;h=0cb560bdf9b9f84bf982e706e062f5d99a4b2060;hb=a9697bd06f21230c6c98cbade589374103d16a0e;hp=36b891e11e306793b4aacdbe15ff38b6448a73da;hpb=6d74b82cc7941041aecc8f648a21ab40649abba0;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 36b891e..0cb560b 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -1183,7 +1183,7 @@ of your application to support a change lifecycle (e.g. DEV, TEST, PROD) and the DB schemas are named based on the environment (e.g. database1_dev). However, one can dynamically "map" to the proper DB schema by overriding the -L method in your Schema class and +L method in your Schema class and building a renaming facility, like so: package MyApp::Schema; @@ -1223,13 +1223,13 @@ building a renaming facility, like so: 1; -By overriding the L +By overriding the L method and extracting a custom option from the provided \%attr hashref one can then simply iterate over all the Schema's ResultSources, renaming them as needed. To use this facility, simply add or modify the \%attr hashref that is passed to -L, as follows: +L, as follows: my $schema = MyApp::Schema->connect(