From: Dagfinn Ilmari Mannsåker Date: Tue, 29 Apr 2008 00:45:58 +0000 (+0000) Subject: Improve method argument and return value docs X-Git-Tag: 0.04999_06~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=530e0bf62d46a17b694359dcc092ba33328b319f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Improve method argument and return value docs --- diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index 8d8d181..5db8ed8 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -71,6 +71,12 @@ the road. =head2 loader_class +=over 4 + +=item Argument: $loader_class + +=back + Set the loader class to be instantiated when L is called. If the classname starts with "::", "DBIx::Class::Schema::Loader" is prepended. Defaults to L (which must @@ -81,6 +87,12 @@ with L. =head2 loader_options +=over 4 + +=item Argument: \%loader_options + +=back + Example in Synopsis above demonstrates a few common arguments. For detailed information on all of the arguments, most of which are only useful in fairly complex scenarios, see the @@ -132,7 +144,15 @@ sub _invoke_loader { =head2 connection -See L for basic usage. +=over 4 + +=item Arguments: @args + +=item Return Value: $new_schema + +=back + +See L for basic usage. If the final argument is a hashref, and it contains the keys C or C, those keys will be deleted, and their values value will be @@ -168,7 +188,7 @@ sub connection { =head2 clone -See L. +See L. =cut @@ -187,7 +207,11 @@ sub clone { =head2 dump_to_dir -Argument: directory name. +=over 4 + +=item Argument: $directory + +=back Calling this as a class method on either L or any derived schema class will cause all affected schemas to dump @@ -253,6 +277,14 @@ sub import { =head2 make_schema_at +=over 4 + +=item Arguments: $schema_name, \%loader_options, \@connect_info + +=item Return Value: $schema_name + +=back + This simple function allows one to create a Loader-based schema in-memory on the fly without any on-disk class files of any kind. When used with the C option, you can @@ -302,6 +334,12 @@ sub make_schema_at { =head2 rescan +=over 4 + +=item Return Value: @new_monikers + +=back + Re-scans the database for newly added tables since the initial load, and adds them to the schema at runtime, including relationships, etc. Does not process drops or changes.