From: Brendan Byrd Date: Tue, 27 Mar 2012 01:31:45 +0000 (-0400) Subject: Various other POD fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb13a49f;p=dbsrgits%2FDBIx-Class-Historic.git Various other POD fixes Change docs to reflect new Manual::ResultClass Stop using "moniker" There is no Row; there is only Zuul. Arguments, Return Values, and Linking -will- be enforced! --- diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index b37a400..dc4123a 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -230,7 +230,7 @@ Then you can use these classes in your application's code: my $cd = $millennium_cds_rs->next; # SELECT ... FROM cds JOIN artists ... my $cd_artist_name = $cd->artist->name; # Already has the data so no 2nd query - # new() makes a DBIx::Class::Row object but doesnt insert it into the DB. + # new() makes a Result object but doesnt insert it into the DB. # create() is the same as new() then insert(). my $new_cd = $schema->resultset('CD')->new({ title => 'Spoon' }); $new_cd->artist($cd->artist); diff --git a/lib/DBIx/Class/Core.pm b/lib/DBIx/Class/Core.pm index b94db4e..39407dc 100644 --- a/lib/DBIx/Class/Core.pm +++ b/lib/DBIx/Class/Core.pm @@ -48,6 +48,9 @@ The core modules currently are: =back +A better overview of the methods found in a Result class can be found +in L. + =head1 AUTHOR AND CONTRIBUTORS See L and L in DBIx::Class diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index c684ed7..56b3250 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -717,9 +717,9 @@ SQL statements: =head1 ROW-LEVEL OPERATIONS -=head2 Retrieving a row object's Schema +=head2 Retrieving a result object's Schema -It is possible to get a Schema object from a row object like so: +It is possible to get a Schema object from a result object like so: my $schema = $cd->result_source->schema; # use the schema as normal: @@ -964,7 +964,7 @@ B test.pl Alternatively you can use L that implements exactly the above functionality. -=head2 Skip row object creation for faster results +=head2 Skip result object creation for faster results DBIx::Class is not built for speed, it's built for convenience and ease of use, but sometimes you just need to get the data, and skip the @@ -1063,7 +1063,7 @@ See L for more documentation. =head2 Creating a result set from a set of rows -Sometimes you have a (set of) row objects that you want to put into a +Sometimes you have a (set of) result objects that you want to put into a resultset without the need to hit the DB again. You can do that by using the L method: @@ -2162,8 +2162,8 @@ L. =item * Use L in void context to insert data -when you don't need the resulting L objects, if possible, but -see the caveats. +when you don't need the resulting L objects, +if possible, but see the caveats. When inserting many rows, for best results, populate a large number of rows at a time, but not so large that the table is locked for an unacceptably long time. diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index 8a706e1..051ae30 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -351,7 +351,7 @@ C on the resultset will only return the total number in the page. =item .. insert a row with an auto incrementing primary key? This happens automatically. After -L a row object, the primary +L a result object, the primary key value created by your database can be fetched by calling C (or the access of your primary key column) on the object. @@ -536,7 +536,7 @@ L runs the actual SQL statement as late as possible, thus if you create a resultset using C in scalar context, no query is executed. You can create further resultset refinements by calling search again or relationship accessors. The SQL query is only run when -you ask the resultset for an actual row object. +you ask the resultset for an actual result object. =item How do I deal with tables that lack a primary key? @@ -556,7 +556,7 @@ Look at the tips in L =item How do I reduce the overhead of database queries? You can reduce the overhead of object creation within L -using the tips in L +using the tips in L and L =item How do I override a run time method (e.g. a relationship accessor)? diff --git a/lib/DBIx/Class/Manual/Glossary.pod b/lib/DBIx/Class/Manual/Glossary.pod index 2cd6db3..4feb8e1 100644 --- a/lib/DBIx/Class/Manual/Glossary.pod +++ b/lib/DBIx/Class/Manual/Glossary.pod @@ -73,12 +73,14 @@ At least one L class is needed per database. =head2 Result class A Result class defines both a source of data (usually one per table), -and the methods that will be available in the L objects created -using that source. +and the methods that will be available in the L objects +created using that source. One Result class is needed per data source (table, view, query) used in your application, they should inherit from L. +See also: L + =head2 ResultSource ResultSource objects represent the source of your data, these are @@ -101,23 +103,43 @@ See also: L =head2 Record -See Row. +See Result. =head2 Row -Row objects contain your actual data. They are returned from ResultSet objects. +See Result. + +=head2 Result + +Result objects contain your actual data. They are returned from +ResultSet objects. These are sometimes (incorrectly) called +row objects, including older versions of the DBIC documentation. + +See also: L =head2 Object -See Row. +See Result. =head2 join +See Join. + =head2 prefetch +Similiar to a join, except the related result objects are fetched and +cached for future use, instead of used directly from the ResultSet. This +allows you to jump to different relationships within a Result without +worrying about generating a ton of extra SELECT statements. =head1 SQL TERMS +=head2 CRUD + +Create, Read, Update, Delete. A general concept of something that can +do all four operations (INSERT, SELECT, UPDATE, DELETE), usually at a +row-level. + =head2 Join This is an SQL keyword, it is used to link multiple tables in one SQL @@ -135,4 +157,12 @@ can be found in L. =head2 Related data In SQL, related data actually refers to data that are normalised into -the same table. (Yes. DBIC does mis-use this term). +the same table. (Yes. DBIC does mis-use this term.) + +=head1 AUTHOR AND CONTRIBUTORS + +See L and L in DBIx::Class + +=head1 LICENSE + +You may distribute this code under the same terms as Perl itself. diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index eebc98c..382f72d 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -67,7 +67,7 @@ The important thing to understand: =head2 Search results are returned as Rows Rows of the search from the database are blessed into -L objects. +L objects. =head1 SETTING UP DBIx::Class diff --git a/lib/DBIx/Class/Manual/Reading.pod b/lib/DBIx/Class/Manual/Reading.pod index b9c4b41..cb352a2 100644 --- a/lib/DBIx/Class/Manual/Reading.pod +++ b/lib/DBIx/Class/Manual/Reading.pod @@ -89,6 +89,20 @@ method arguments, use with caution. =item * +L<$obj|DBIx::Class> - Reference to the source class or object definition + +All arguments and return values should provide a link to the object's +class documentation or definition, even if it's the same class as the current +documentation. For example: + + ## Correct, if stated within DBIx::Class::ResultSet + L<$resultset|/new> + + ## Correct, if stated outside DBIx::Class::ResultSet + L<$resultset|DBIx::Class::ResultSet> + +=item * + ? - Optional, should be placed after the argument type and name. ## Correct @@ -112,26 +126,28 @@ marked optional. =back -The second item starts with the text "Return value:". The remainder of -the line is either the text "undefined", a text describing the result of -the method, or a variable with a descriptive name. +The second item starts with the text "Return Value:". The remainder of +the line is either the text "not defined" or a variable with a descriptive +name. ## Good examples - =item Return value: undefined - =item Return value: A schema object - =item Return value: $classname + =item Return Value: not defined + =item Return Value: L<$schema|DBIx::Class::Schema> + =item Return Value: $classname ## Bad examples - =item Return value: The names + =item Return Value: The names -"undefined" means the method does not deliberately return a value, and -the caller should not use or rely on anything it does return. (Perl +"not defined" means the method does not deliberately return a value, and +the caller should not use or rely on anything it does return. (Perl functions always return something, usually the result of the last code -statement, if there is no explicit return statement.) +statement, if there is no explicit return statement.) This is different +than specifying "undef", which means that it explicitly returns undef, +though usually this is used an alternate return (like C<$obj | undef>). =item * -The argument list is followed by a single paragraph describing what +The argument/return list is followed by a single paragraph describing what the method does. =item * @@ -144,7 +160,7 @@ self-explanatory enough to not require it. Use best judgement. =item * -The argument list is followed by some examples of how to use the +The argument/return list is followed by some examples of how to use the method, using its various types of arguments. The examples can also include ways to use the results if diff --git a/lib/DBIx/Class/Manual/Troubleshooting.pod b/lib/DBIx/Class/Manual/Troubleshooting.pod index 747caf9..f76934e 100644 --- a/lib/DBIx/Class/Manual/Troubleshooting.pod +++ b/lib/DBIx/Class/Manual/Troubleshooting.pod @@ -134,7 +134,7 @@ with full current updates will not be subject to this problem):- This issue is due to perl doing an exhaustive search of blessed objects under certain circumstances. The problem shows up as performance -degradation exponential to the number of L row objects in +degradation exponential to the number of L result objects in memory, so can be unnoticeable with certain data sets, but with huge performance impacts on other datasets. @@ -152,7 +152,7 @@ L It has been observed, using L, that creating a L object which includes a column of data type TEXT/BLOB/etc. will allocate LongReadLen bytes. This allocation does not leak, but if LongReadLen -is large in size, and many such row objects are created, e.g. as the +is large in size, and many such result objects are created, e.g. as the output of a ResultSet query, the memory footprint of the Perl interpreter can grow very large. diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index 281d30a..d4c5a33 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -807,7 +807,7 @@ EOD '=head2 req_group_list', '=over', '=item Arguments: none', - '=item Returns: \%list_of_requirement_groups', + '=item Return Value: \%list_of_requirement_groups', '=back', <<'EOD', This method should be used by DBIx::Class packagers, to get a hashref of all @@ -818,7 +818,7 @@ EOD '=head2 req_list_for', '=over', '=item Arguments: $group_name', - '=item Returns: \%list_of_module_version_pairs', + '=item Return Value: \%list_of_module_version_pairs', '=back', <<'EOD', This method should be used by DBIx::Class extension authors, to determine the @@ -830,7 +830,7 @@ EOD '=head2 req_ok_for', '=over', '=item Arguments: $group_name', - '=item Returns: 1|0', + '=item Return Value: 1|0', '=back', <<'EOD', Returns true or false depending on whether all modules required by @@ -840,7 +840,7 @@ EOD '=head2 req_missing_for', '=over', '=item Arguments: $group_name', - '=item Returns: $error_message_string', + '=item Return Value: $error_message_string', '=back', <<"EOD", Returns a single line string suitable for inclusion in larger error messages. @@ -860,7 +860,7 @@ EOD '=head2 req_errorlist_for', '=over', '=item Arguments: $group_name', - '=item Returns: \%list_of_loaderrors_per_module', + '=item Return Value: \%list_of_loaderrors_per_module', '=back', <<'EOD', Returns a hashref containing the actual errors that occured while attempting diff --git a/lib/DBIx/Class/Ordered.pm b/lib/DBIx/Class/Ordered.pm index 9395767..5e40dc0 100644 --- a/lib/DBIx/Class/Ordered.pm +++ b/lib/DBIx/Class/Ordered.pm @@ -275,7 +275,7 @@ sub last_sibling { return defined $lsib ? $lsib : 0; } -# an optimized method to get the last sibling position value without inflating a row object +# an optimized method to get the last sibling position value without inflating a result object sub _last_sibling_posval { my $self = shift; my $position_column = $self->position_column; diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index 62792fb..e128e57 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -50,7 +50,7 @@ sub _ident_values { if (@missing && $self->in_storage) { $self->throw_exception ( - 'Unable to uniquely identify row object with missing PK columns: ' + 'Unable to uniquely identify result object with missing PK columns: ' . join (', ', @missing ) ); } @@ -60,7 +60,7 @@ sub _ident_values { =head2 ID -Returns a unique id string identifying a row object by primary key. +Returns a unique id string identifying a result object by primary key. Used by L and L. @@ -126,7 +126,7 @@ sub _mk_ident_cond { if (@undef && $self->in_storage) { $self->throw_exception ( - 'Unable to construct row object identity condition due to NULL PK columns: ' + 'Unable to construct result object identity condition due to NULL PK columns: ' . join (', ', @undef) ); } diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index acb4cf4..c6f744d 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -75,7 +75,7 @@ Each relationship sets up an accessor method on the L objects that represent the items of your table. From L objects, the relationships can be searched using the "search_related" method. -In list context, each returns a list of Row objects for the related class, +In list context, each returns a list of Result objects for the related class, in scalar context, a new ResultSet representing the joined tables is returned. Thus, the calls can be chained to produce complex queries. Since the database is not actually queried until you attempt to retrieve @@ -137,7 +137,7 @@ in this class or C specifies a reference to a join condition. =item accessor_name This argument is the name of the method you can call on a -L object to retrieve the instance of the foreign +L object to retrieve the instance of the foreign class matching this relationship. This is often called the C. @@ -231,7 +231,7 @@ which can be assigned to relationships as well. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, \%attrs? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, L<\%attrs?|DBIx::Class::ResultSet/ATTRIBUTES> =back @@ -248,9 +248,9 @@ specifies a reference to a join condition. =item accessor_name This argument is the name of the method you can call on a -L object to retrieve a resultset of the related -class restricted to the ones related to the row object. In list -context it returns the row objects. This is often called the +L object to retrieve a resultset of the related +class restricted to the ones related to the result object. In list +context it returns the result objects. This is often called the C. Use this accessor_name in L @@ -355,7 +355,7 @@ relationships as well. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, \%attrs? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, L<\%attrs?|DBIx::Class::ResultSet/ATTRIBUTES> =back @@ -370,7 +370,7 @@ condition. =item accessor_name This argument is the name of the method you can call on a -L object to retrieve the instance of the foreign +L object to retrieve the instance of the foreign class matching this relationship. This is often called the C. @@ -450,7 +450,7 @@ you probably just meant to use C. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, \%attrs? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond|\&cond?, L<\%attrs?|DBIx::Class::ResultSet/ATTRIBUTES> =back @@ -465,7 +465,7 @@ condition. =item accessor_name This argument is the name of the method you can call on a -L object to retrieve the instance of the foreign +L object to retrieve the instance of the foreign class matching this relationship. This is often called the C. @@ -543,7 +543,7 @@ L. =over 4 -=item Arguments: $accessor_name, $link_rel_name, $foreign_rel_name, \%attrs? +=item Arguments: $accessor_name, $link_rel_name, $foreign_rel_name, L<\%attrs?|DBIx::Class::ResultSet/ATTRIBUTES> =back @@ -562,7 +562,7 @@ C and similar methods which operate on true relationships. =item accessor_name This argument is the name of the method you can call on a -L object to retrieve the rows matching this +L object to retrieve the rows matching this relationship. On a many_to_many, unlike other relationships, this cannot be used in diff --git a/lib/DBIx/Class/ResultClass/HashRefInflator.pm b/lib/DBIx/Class/ResultClass/HashRefInflator.pm index 3df5f20..4223930 100644 --- a/lib/DBIx/Class/ResultClass/HashRefInflator.pm +++ b/lib/DBIx/Class/ResultClass/HashRefInflator.pm @@ -30,7 +30,7 @@ DBIx::Class::ResultClass::HashRefInflator - Get raw hashrefs from a resultset DBIx::Class is faster than older ORMs like Class::DBI but it still isn't designed primarily for speed. Sometimes you need to quickly retrieve the data -from a massive resultset, while skipping the creation of fancy row objects. +from a massive resultset, while skipping the creation of fancy result objects. Specifying this class as a C for a resultset will change C<< $rs->next >> to return a plain data hash-ref (or a list of such hash-refs if C<< $rs->all >> is used). diff --git a/lib/DBIx/Class/ResultSetColumn.pm b/lib/DBIx/Class/ResultSetColumn.pm index 60d08c7..abe6189 100644 --- a/lib/DBIx/Class/ResultSetColumn.pm +++ b/lib/DBIx/Class/ResultSetColumn.pm @@ -171,7 +171,7 @@ Returns all values of the column in the resultset (or C if there are none). Much like L but returns values rather -than row objects. +than result objects. =cut @@ -286,7 +286,7 @@ sub min { =item Arguments: none -=item Return Value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back @@ -325,7 +325,7 @@ sub max { =item Arguments: none -=item Return Value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back @@ -364,7 +364,7 @@ sub sum { =item Arguments: none -=item Return Value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back @@ -413,7 +413,7 @@ sub func { =item Arguments: $function -=item Return Value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 6599a4a..c773e19 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -94,7 +94,7 @@ You can retrieve the result source at runtime in the following ways: $schema->source($source_name); -=item From a Row object: +=item From a Result object: $row->result_source; @@ -133,7 +133,7 @@ sub new { =item Arguments: @columns -=item Return value: The ResultSource object +=item Return Value: L<$result_source|/new> =back @@ -146,7 +146,7 @@ pairs, uses the hashref as the L for that column. Repeated calls of this method will add more columns, not replace them. The column names given will be created as accessor methods on your -L objects. You can change the name of the accessor +L objects. You can change the name of the accessor by supplying an L in the column_info hash. If a column name beginning with a plus sign ('+col1') is provided, the @@ -299,7 +299,7 @@ L. =item Arguments: $colname, \%columninfo? -=item Return value: 1/0 (true/false) +=item Return Value: 1/0 (true/false) =back @@ -343,7 +343,7 @@ sub add_column { shift->add_columns(@_); } # DO NOT CHANGE THIS TO GLOB =item Arguments: $colname -=item Return value: 1/0 (true/false) +=item Return Value: 1/0 (true/false) =back @@ -364,7 +364,7 @@ sub has_column { =item Arguments: $colname -=item Return value: Hashref of info +=item Return Value: Hashref of info =back @@ -412,9 +412,9 @@ sub column_info { =over -=item Arguments: None +=item Arguments: none -=item Return value: Ordered list of column names +=item Return Value: Ordered list of column names =back @@ -438,7 +438,7 @@ sub columns { =item Arguments: \@colnames ? -=item Return value: Hashref of column name/info pairs +=item Return Value: Hashref of column name/info pairs =back @@ -512,7 +512,7 @@ sub columns_info { =item Arguments: @colnames -=item Return value: undefined +=item Return Value: not defined =back @@ -530,7 +530,7 @@ broken result source. =item Arguments: $colname -=item Return value: undefined +=item Return Value: not defined =back @@ -568,7 +568,7 @@ sub remove_column { shift->remove_columns(@_); } # DO NOT CHANGE THIS TO GLOB =item Arguments: @cols -=item Return value: undefined +=item Return Value: not defined =back @@ -602,9 +602,9 @@ sub set_primary_key { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: Ordered list of primary column names +=item Return Value: Ordered list of primary column names =back @@ -641,7 +641,7 @@ will be applied to the L of each L =item Arguments: $sequence_name -=item Return value: undefined +=item Return Value: not defined =back @@ -664,7 +664,7 @@ sub sequence { =item Arguments: $name?, \@colnames -=item Return value: undefined +=item Return Value: not defined =back @@ -730,7 +730,7 @@ sub add_unique_constraint { =item Arguments: @constraints -=item Return value: undefined +=item Return Value: not defined =back @@ -782,7 +782,7 @@ sub add_unique_constraints { =item Arguments: \@colnames -=item Return value: Constraint name +=item Return Value: Constraint name =back @@ -816,9 +816,9 @@ sub name_unique_constraint { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: Hash of unique constraint data +=item Return Value: Hash of unique constraint data =back @@ -840,9 +840,9 @@ sub unique_constraints { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: Unique constraint names +=item Return Value: Unique constraint names =back @@ -866,7 +866,7 @@ sub unique_constraint_names { =item Arguments: $constraintname -=item Return value: List of constraint columns +=item Return Value: List of constraint columns =back @@ -894,7 +894,7 @@ sub unique_constraint_columns { =item Arguments: $callback_name | \&callback_code -=item Return value: $callback_name | \&callback_code +=item Return Value: $callback_name | \&callback_code =back @@ -965,9 +965,9 @@ sub _invoke_sqlt_deploy_hook { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back @@ -984,7 +984,7 @@ but is cached from then on unless resultset_class changes. =item Arguments: $classname -=item Return value: $classname +=item Return Value: $classname =back @@ -1010,7 +1010,7 @@ exists. =item Arguments: \%attrs -=item Return value: \%attrs +=item Return Value: \%attrs =back @@ -1046,7 +1046,7 @@ sub resultset { =over 4 -=item Arguments: None +=item Arguments: none =item Result value: $name @@ -1082,9 +1082,9 @@ its class name. =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: FROM clause +=item Return Value: FROM clause =back @@ -1102,9 +1102,9 @@ sub from { die 'Virtual method!' } =over 4 -=item Arguments: $schema +=item Arguments: L<$schema?|DBIx::Class::Schema> -=item Return value: A schema object +=item Return Value: L<$schema|DBIx::Class::Schema> =back @@ -1138,17 +1138,15 @@ sub schema { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: A Storage object +=item Return Value: L<$storage|DBIx::Class::Storage> =back $source->storage->debug(1); -Returns the storage handle for the current schema. - -See also: L +Returns the L for the current schema. =cut @@ -1158,13 +1156,13 @@ sub storage { shift->schema->storage; } =over 4 -=item Arguments: $relname, $related_source_name, \%cond, [ \%attrs ] +=item Arguments: $rel_name, $related_source_name, \%cond, \%attrs? -=item Return value: 1/true if it succeeded +=item Return Value: 1/true if it succeeded =back - $source->add_relationship('relname', 'related_source', $cond, $attrs); + $source->add_relationship('rel_name', 'related_source', $cond, $attrs); L describes a series of methods which create pre-defined useful types of relationships. Look there first @@ -1284,9 +1282,9 @@ sub add_relationship { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: List of relationship names +=item Return Value: L<@rel_names|DBIx::Class::Relationship> =back @@ -1304,14 +1302,14 @@ sub relationships { =over 4 -=item Arguments: $relname +=item Arguments: L<$rel_name|DBIx::Class::Relationship> -=item Return value: Hashref of relation data, +=item Return Value: L<\%rel_data|DBIx::Class::Relationship::Base/add_relationship> =back Returns a hash of relationship information for the specified relationship -name. The keys/values are as specified for L. +name. The keys/values are as specified for L. =cut @@ -1324,9 +1322,9 @@ sub relationship_info { =over 4 -=item Arguments: $rel +=item Arguments: L<$rel_name|DBIx::Class::Relationship> -=item Return value: 1/0 (true/false) +=item Return Value: 1/0 (true/false) =back @@ -1343,9 +1341,9 @@ sub has_relationship { =over 4 -=item Arguments: $relname +=item Arguments: L<$rel_name|DBIx::Class::Relationship> -=item Return value: Hashref of relationship data +=item Return Value: L<\%rel_data|DBIx::Class::Relationship::Base/add_relationship> =back @@ -1566,9 +1564,9 @@ sub pk_depends_on { # having already been inserted. Takes the name of the relationship and a # hashref of columns of the related object. sub _pk_depends_on { - my ($self, $relname, $rel_data) = @_; + my ($self, $rel_name, $rel_data) = @_; - my $relinfo = $self->relationship_info($relname); + my $relinfo = $self->relationship_info($rel_name); # don't assume things if the relationship direction is specified return $relinfo->{attrs}{is_foreign_key_constraint} @@ -1583,7 +1581,7 @@ sub _pk_depends_on { # assume anything that references our PK probably is dependent on us # rather than vice versa, unless the far side is (a) defined or (b) # auto-increment - my $rel_source = $self->related_source($relname); + my $rel_source = $self->related_source($rel_name); foreach my $p ($self->primary_columns) { if (exists $keyhash->{$p}) { @@ -1611,7 +1609,7 @@ our $UNRESOLVABLE_CONDITION = \ '1 = 0'; # list of non-triviail values (notmally conditions) returned as a part # of a joinfree condition hash sub _resolve_condition { - my ($self, $cond, $as, $for, $relname) = @_; + my ($self, $cond, $as, $for, $rel_name) = @_; my $obj_rel = !!blessed $for; @@ -1622,7 +1620,7 @@ sub _resolve_condition { self_alias => $obj_rel ? $as : $for, foreign_alias => $relalias, self_resultsource => $self, - foreign_relname => $relname || ($obj_rel ? $as : $for), + foreign_relname => $rel_name || ($obj_rel ? $as : $for), self_rowobj => $obj_rel ? $for : undef }); @@ -1631,7 +1629,7 @@ sub _resolve_condition { # FIXME sanity check until things stabilize, remove at some point $self->throw_exception ( - "A join-free condition returned for relationship '$relname' without a row-object to chain from" + "A join-free condition returned for relationship '$rel_name' without a row-object to chain from" ) unless $obj_rel; # FIXME another sanity check @@ -1641,7 +1639,7 @@ sub _resolve_condition { first { $_ !~ /^\Q$relalias.\E.+/ } keys %$joinfree_cond ) { $self->throw_exception ( - "The join-free condition returned for relationship '$relname' must be a hash " + "The join-free condition returned for relationship '$rel_name' must be a hash " .'reference with all keys being valid columns on the related result source' ); } @@ -1658,7 +1656,7 @@ sub _resolve_condition { } # see which parts of the joinfree cond are conditionals - my $relcol_list = { map { $_ => 1 } $self->related_source($relname)->columns }; + my $relcol_list = { map { $_ => 1 } $self->related_source($rel_name)->columns }; for my $c (keys %$joinfree_cond) { my ($colname) = $c =~ /^ (?: \Q$relalias.\E )? (.+)/x; @@ -1735,14 +1733,14 @@ sub _resolve_condition { elsif (ref $cond eq 'ARRAY') { my (@ret, $crosstable); for (@$cond) { - my ($cond, $crosstab) = $self->_resolve_condition($_, $as, $for, $relname); + my ($cond, $crosstab) = $self->_resolve_condition($_, $as, $for, $rel_name); push @ret, $cond; $crosstable ||= $crosstab; } return wantarray ? (\@ret, $crosstable) : \@ret; } else { - $self->throw_exception ("Can't handle condition $cond for relationship '$relname' yet :("); + $self->throw_exception ("Can't handle condition $cond for relationship '$rel_name' yet :("); } } @@ -1857,9 +1855,9 @@ sub _resolve_prefetch { =over 4 -=item Arguments: $relname +=item Arguments: $rel_name -=item Return value: $source +=item Return Value: $source =back @@ -1890,9 +1888,9 @@ sub related_source { =over 4 -=item Arguments: $relname +=item Arguments: $rel_name -=item Return value: $classname +=item Return Value: $classname =back @@ -1912,9 +1910,9 @@ sub related_class { =over 4 -=item Arguments: None +=item Arguments: none -=item Return value: $source_handle +=item Return Value: L<$source_handle|DBIx::Class::ResultSourceHandle> =back @@ -2031,7 +2029,7 @@ Creates a new ResultSource object. Not normally called directly by end users. =item Arguments: 1/0 (default: 0) -=item Return value: 1/0 +=item Return Value: 1/0 =back diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 1e11805..ca89b77 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -34,14 +34,14 @@ DBIx::Class::Row - Basic row methods This class is responsible for defining and doing basic operations on rows derived from L objects. -Row objects are returned from Ls using the +Result objects are returned from Ls using the L, L, L and L methods, as well as invocations of 'single' ( L, L or L) -relationship accessors of L objects. +relationship accessors of L objects. =head1 NOTE @@ -58,7 +58,7 @@ combines the methods from several classes, one of them being L. Therefore, while many of the methods available to a L-derived Result class are described in the following documentation, it does not detail all of the methods available to Result -objects. Refer to L for more info. +objects. Refer to L for more info. =head1 METHODS @@ -72,11 +72,11 @@ objects. Refer to L for more info. =item Arguments: \%attrs or \%colsandvalues -=item Returns: A DBIx::Class::Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back -While you can create a new row object by calling C directly on +While you can create a new result object by calling C directly on this class, you are better off calling it on a L object. @@ -294,7 +294,7 @@ sub new { =item Arguments: $value? -=item Returns: $value +=item Return Value: $value =back @@ -313,7 +313,7 @@ not store the data until L or L is called on the row. =item Arguments: none -=item Returns: The Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back @@ -321,7 +321,7 @@ Inserts an object previously created by L into the database if it isn't already in there. Returns the object itself. To insert an entirely new row into the database, use L. -To fetch an uninserted row object, call +To fetch an uninserted result object, call L on a resultset. This will also insert any uninserted, related objects held inside this @@ -466,7 +466,7 @@ sub insert { =item Arguments: none or 1|0 -=item Returns: 1|0 +=item Return Value: 1|0 =back @@ -475,7 +475,7 @@ not. This is set to true when L, L or L are used. -Creating a row object using L, or calling +Creating a result object using L, or calling L on one, sets it to false. =cut @@ -494,11 +494,11 @@ sub in_storage { =item Arguments: none or a hashref -=item Returns: The Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back -Throws an exception if the row object is not yet in the database, +Throws an exception if the result object is not yet in the database, according to L. This method issues an SQL UPDATE query to commit any changes to the @@ -523,7 +523,7 @@ contain scalar references, e.g.: $row->update({ last_modified => \'NOW()' }); The update will pass the values verbatim into SQL. (See -L docs). The values in your Row object will NOT change +L docs). The values in your Result object will NOT change as a result of the update call, if you want the object to be updated with the actual values from the database, call L after the update. @@ -572,7 +572,7 @@ sub update { =item Arguments: none -=item Returns: The Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back @@ -596,7 +596,7 @@ main row first> and only then attempts to delete any remaining related rows. If you delete an object within a txn_do() (see L) -and the transaction subsequently fails, the row object will remain marked as +and the transaction subsequently fails, the result object will remain marked as not being in storage. If you know for a fact that the object is still in storage (i.e. by inspecting the cause of the transaction's failure), you can use C<< $obj->in_storage(1) >> to restore consistency between the object and @@ -638,14 +638,14 @@ sub delete { =item Arguments: $columnname -=item Returns: The value of the column +=item Return Value: The value of the column =back Throws an exception if the column name given doesn't exist according to L. -Returns a raw column value from the row object, if it has already +Returns a raw column value from the result object, if it has already been fetched from the database or set by an accessor. If an L has been set, it @@ -682,7 +682,7 @@ sub get_column { =item Arguments: $columnname -=item Returns: 0|1 +=item Return Value: 0|1 =back @@ -706,7 +706,7 @@ sub has_column_loaded { =item Arguments: none -=item Returns: A hash of columnname, value pairs. +=item Return Value: A hash of columnname, value pairs. =back @@ -736,7 +736,7 @@ sub get_columns { =item Arguments: none -=item Returns: A hash of column, value pairs +=item Return Value: A hash of column, value pairs =back @@ -761,7 +761,7 @@ sub get_dirty_columns { =item Arguments: $columnname -=item Returns: undefined +=item Return Value: not defined =back @@ -801,7 +801,7 @@ sub make_column_dirty { =item Arguments: none -=item Returns: A hash of column, object|value pairs +=item Return Value: A hash of column, object|value pairs =back @@ -864,7 +864,7 @@ sub _is_column_numeric { =item Arguments: $columnname, $value -=item Returns: $value +=item Return Value: $value =back @@ -974,7 +974,7 @@ sub _track_storage_value { =item Arguments: \%columndata -=item Returns: The Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back @@ -1000,16 +1000,16 @@ sub set_columns { =item Arguments: \%columndata -=item Returns: The Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back Sets more than one column value at once. Any inflated values are deflated and the raw values stored. -Any related values passed as Row objects, using the relation name as a +Any related values passed as Result objects, using the relation name as a key, are reduced to the appropriate foreign key values and stored. If -instead of related row objects, a hashref of column, value data is +instead of related result objects, a hashref of column, value data is passed, will create the related object first then store. Will even accept arrayrefs of data as a value to a @@ -1057,7 +1057,7 @@ sub set_inflated_columns { =item Arguments: \%replacementdata -=item Returns: The Row object copy +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> copy =back @@ -1128,7 +1128,7 @@ sub copy { =item Arguments: $columnname, $value -=item Returns: The value sent to storage +=item Return Value: The value sent to storage =back @@ -1136,7 +1136,7 @@ Set a raw value for a column without marking it as changed. This method is used internally by L which you should probably be using. -This is the lowest level at which data is set on a row object, +This is the lowest level at which data is set on a result object, extend this method to catch all data setting methods. =cut @@ -1156,14 +1156,14 @@ sub store_column { =over -=item Arguments: $result_source, \%columndata, \%prefetcheddata +=item Arguments: L<$result_source|DBIx::Class::ResultSource>, \%columndata, \%prefetcheddata -=item Returns: A Row object +=item Return Value: L<$result|DBIx::Class::Manual::ResultClass> =back All L methods that retrieve data from the -database and turn it into row objects call this method. +database and turn it into result objects call this method. Extend this method in your Result classes to hook into this process, for example to rebless the result into a different class. @@ -1263,7 +1263,7 @@ sub inflate_result { =item Arguments: none -=item Returns: Result of update or insert operation +=item Return Value: Result of update or insert operation =back @@ -1294,7 +1294,7 @@ sub update_or_insert { =item Arguments: none -=item Returns: 0|1 or @columnnames +=item Return Value: 0|1 or @columnnames =back @@ -1316,7 +1316,7 @@ sub is_changed { =item Arguments: $columname -=item Returns: 0|1 +=item Return Value: 0|1 =back @@ -1335,9 +1335,9 @@ sub is_column_changed { =over -=item Arguments: $result_source_instance +=item Arguments: L<$result_source?|DBIx::Class::ResultSource> -=item Returns: a ResultSource instance +=item Return Value: L<$result_source|DBIx::Class::ResultSource> =back @@ -1373,7 +1373,7 @@ sub result_source { =item Arguments: $columnname, \%columninfo -=item Returns: undefined +=item Return Value: not defined =back @@ -1404,11 +1404,11 @@ sub register_column { =item Arguments: \%attrs -=item Returns: A Row object +=item Return Value: A Result object =back -Fetches a fresh copy of the Row object from the database and returns it. +Fetches a fresh copy of the Result object from the database and returns it. Throws an exception if a proper WHERE clause identifying the database row can not be constructed (i.e. if the original object does not contain its entire @@ -1416,11 +1416,11 @@ entire ). If passed the \%attrs argument, will first apply these attributes to the resultset used to find the row. -This copy can then be used to compare to an existing row object, to +This copy can then be used to compare to an existing result object, to determine if any changes have been made in the database since it was created. -To just update your Row object with any latest changes from the +To just update your Result object with any latest changes from the database, use L instead. The \%attrs argument should be compatible with @@ -1448,7 +1448,7 @@ sub get_from_storage { =item Arguments: none or $attrs -=item Returns: self (updates object in-place) +=item Return Value: self (updates object in-place) =back diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 415fd79..c55eefd 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -406,7 +406,7 @@ sub load_classes { =item Arguments: $storage_type|{$storage_type, \%args} -=item Return value: $storage_type|{$storage_type, \%args} +=item Return Value: $storage_type|{$storage_type, \%args} =item Default value: DBIx::Class::Storage::DBI @@ -432,7 +432,7 @@ L for an example of this. =item Arguments: $code_reference -=item Return value: $code_reference +=item Return Value: $code_reference =item Default value: None @@ -530,9 +530,9 @@ sub connect { shift->clone->connection(@_) } =over 4 -=item Arguments: $source_name +=item Arguments: L<$source_name|DBIx::Class::ResultSource/source_name> -=item Return Value: $resultset +=item Return Value: L<$resultset|DBIx::Class::ResultSet> =back @@ -544,17 +544,17 @@ name. =cut sub resultset { - my ($self, $moniker) = @_; + my ($self, $source_name) = @_; $self->throw_exception('resultset() expects a source name') - unless defined $moniker; - return $self->source($moniker)->resultset; + unless defined $source_name; + return $self->source($source_name)->resultset; } =head2 sources =over 4 -=item Return Value: @source_names +=item Return Value: L<@source_names|DBIx::Class::ResultSource/source_name> =back @@ -570,9 +570,9 @@ sub sources { return keys %{shift->source_registrations}; } =over 4 -=item Arguments: $source_name +=item Arguments: L<$source_name|DBIx::Class::ResultSource/source_name> -=item Return Value: $result_source +=item Return Value: L<$result_source|DBIx::Class::ResultSource> =back @@ -589,14 +589,14 @@ sub source { $self->throw_exception("source() expects a source name") unless @_; - my $moniker = shift; + my $source_name = shift; my $sreg = $self->source_registrations; - return $sreg->{$moniker} if exists $sreg->{$moniker}; + return $sreg->{$source_name} if exists $sreg->{$source_name}; # if we got here, they probably passed a full class name - my $mapped = $self->class_mappings->{$moniker}; - $self->throw_exception("Can't find source for ${moniker}") + my $mapped = $self->class_mappings->{$source_name}; + $self->throw_exception("Can't find source for ${source_name}") unless $mapped && exists $sreg->{$mapped}; return $sreg->{$mapped}; } @@ -605,7 +605,7 @@ sub source { =over 4 -=item Arguments: $source_name +=item Arguments: L<$source_name|DBIx::Class::ResultSource/source_name> =item Return Value: $classname @@ -618,8 +618,8 @@ Retrieves the Result class name for the given source name. =cut sub class { - my ($self, $moniker) = @_; - return $self->source($moniker)->result_class; + my ($self, $source_name) = @_; + return $self->source($source_name)->result_class; } =head2 txn_do @@ -738,9 +738,9 @@ found in L. =over 4 -=item Arguments: $source_name, \@data; +=item Arguments: L<$source_name|DBIx::Class::ResultSource/source_name>, \@data; -=item Return value: \@$objects | nothing +=item Return Value: L<\@$results|DBIx::Class::Manual::ResultClass> | undef =back @@ -754,7 +754,7 @@ assumes that your datasets all contain the same type of values, using scalar references in a column in one row, and not in another will probably not work. Otherwise, each set of data is inserted into the database using -L, and a arrayref of the resulting row +L, and an arrayref of the Result objects is returned. e.g. @@ -885,16 +885,16 @@ will produce the output # my ($self, $target, $base) = @_; # my $schema = $self->clone; -# foreach my $moniker ($schema->sources) { -# my $source = $schema->source($moniker); -# my $target_class = "${target}::${moniker}"; +# foreach my $source_name ($schema->sources) { +# my $source = $schema->source($source_name); +# my $target_class = "${target}::${source_name}"; # $self->inject_base( # $target_class => $source->result_class, ($base ? $base : ()) # ); # $source->result_class($target_class); # $target_class->result_source_instance($source) # if $target_class->can('result_source_instance'); -# $schema->register_source($moniker, $source); +# $schema->register_source($source_name, $source); # } # return $schema; # } @@ -916,14 +916,14 @@ sub compose_namespace { use warnings qw/redefine/; no strict qw/refs/; - foreach my $moniker ($self->sources) { - my $orig_source = $self->source($moniker); + foreach my $source_name ($self->sources) { + my $orig_source = $self->source($source_name); - my $target_class = "${target}::${moniker}"; + my $target_class = "${target}::${source_name}"; $self->inject_base($target_class, $orig_source->result_class, ($base || ()) ); # register_source examines result_class, and then returns us a clone - my $new_source = $schema->register_source($moniker, bless + my $new_source = $schema->register_source($source_name, bless { %$orig_source, result_class => $target_class }, ref $orig_source, ); @@ -1047,12 +1047,12 @@ sub _copy_state_from { $self->class_mappings({ %{$from->class_mappings} }); $self->source_registrations({ %{$from->source_registrations} }); - foreach my $moniker ($from->sources) { - my $source = $from->source($moniker); + foreach my $source_name ($from->sources) { + my $source = $from->source($source_name); my $new = $source->new($source); # we use extra here as we want to leave the class_mappings as they are # but overwrite the source_registrations entry with the new source - $self->register_extra_source($moniker => $new); + $self->register_extra_source($source_name => $new); } if ($from->storage) { @@ -1137,7 +1137,7 @@ sub deploy { =item Arguments: See L -=item Return value: $listofstatements +=item Return Value: $listofstatements =back @@ -1186,7 +1186,7 @@ sub create_ddl_dir { =item Arguments: $database-type, $version, $directory, $preversion -=item Return value: $normalised_filename +=item Return Value: $normalised_filename =back @@ -1305,7 +1305,7 @@ sub schema_version { =over 4 -=item Arguments: $moniker, $component_class +=item Arguments: $source_name, $component_class =back @@ -1318,27 +1318,27 @@ file). You may also need it to register classes at runtime. Registers a class which isa DBIx::Class::ResultSourceProxy. Equivalent to calling: - $schema->register_source($moniker, $component_class->result_source_instance); + $schema->register_source($source_name, $component_class->result_source_instance); =cut sub register_class { - my ($self, $moniker, $to_register) = @_; - $self->register_source($moniker => $to_register->result_source_instance); + my ($self, $source_name, $to_register) = @_; + $self->register_source($source_name => $to_register->result_source_instance); } =head2 register_source =over 4 -=item Arguments: $moniker, $result_source +=item Arguments: $source_name, L<$result_source|DBIx::Class::ResultSource> =back This method is called by L. Registers the L in the schema with the given -moniker. +source name. =cut @@ -1348,11 +1348,11 @@ sub register_source { shift->_register_source(@_) } =over 4 -=item Arguments: $moniker +=item Arguments: $source_name =back -Removes the L from the schema for the given moniker. +Removes the L from the schema for the given source name. =cut @@ -1362,7 +1362,7 @@ sub unregister_source { shift->_unregister_source(@_) } =over 4 -=item Arguments: $moniker, $result_source +=item Arguments: $source_name, L<$result_source|DBIx::Class::ResultSource> =back @@ -1374,15 +1374,15 @@ has a source and you want to register an extra one. sub register_extra_source { shift->_register_source(@_, { extra => 1 }) } sub _register_source { - my ($self, $moniker, $source, $params) = @_; + my ($self, $source_name, $source, $params) = @_; - $source = $source->new({ %$source, source_name => $moniker }); + $source = $source->new({ %$source, source_name => $source_name }); $source->schema($self); weaken $source->{schema} if ref($self); my %reg = %{$self->source_registrations}; - $reg{$moniker} = $source; + $reg{$source_name} = $source; $self->source_registrations(\%reg); return $source if $params->{extra}; @@ -1393,7 +1393,7 @@ sub _register_source { if ( exists $map{$rs_class} and - $map{$rs_class} ne $moniker + $map{$rs_class} ne $source_name and $rsrc ne $_[2] # orig_source ) { @@ -1404,7 +1404,7 @@ sub _register_source { ; } - $map{$rs_class} = $moniker; + $map{$rs_class} = $source_name; $self->class_mappings(\%map); } @@ -1418,7 +1418,7 @@ sub DESTROY { my $self = shift; my $srcs = $self->source_registrations; - for my $moniker (keys %$srcs) { + for my $source_name (keys %$srcs) { # find first source that is not about to be GCed (someone other than $self # holds a reference to it) and reattach to it, weakening our own link # @@ -1426,11 +1426,11 @@ sub DESTROY { # which will serve as a signal to not try doing anything else # however beware - on older perls the exception seems randomly untrappable # due to some weird race condition during thread joining :((( - if (ref $srcs->{$moniker} and svref_2object($srcs->{$moniker})->REFCNT > 1) { + if (ref $srcs->{$source_name} and svref_2object($srcs->{$source_name})->REFCNT > 1) { local $@; eval { - $srcs->{$moniker}->schema($self); - weaken $srcs->{$moniker}; + $srcs->{$source_name}->schema($self); + weaken $srcs->{$source_name}; 1; } or do { $global_phase_destroy = 1; @@ -1442,10 +1442,10 @@ sub DESTROY { } sub _unregister_source { - my ($self, $moniker) = @_; + my ($self, $source_name) = @_; my %reg = %{$self->source_registrations}; - my $source = delete $reg{$moniker}; + my $source = delete $reg{$source_name}; $self->source_registrations(\%reg); if ($source->result_class) { my %map = %{$self->class_mappings}; @@ -1506,8 +1506,8 @@ sub compose_connection { if ($self eq $target) { # Pathological case, largely caused by the docs on early C::M::DBIC::Plain - foreach my $moniker ($self->sources) { - my $source = $self->source($moniker); + foreach my $source_name ($self->sources) { + my $source = $self->source($source_name); my $class = $source->result_class; $self->inject_base($class, $base); $class->mk_classdata(resultset_instance => $source->resultset); @@ -1525,10 +1525,10 @@ sub compose_connection { } $schema->connection(@info); - foreach my $moniker ($schema->sources) { - my $source = $schema->source($moniker); + foreach my $source_name ($schema->sources) { + my $source = $schema->source($source_name); my $class = $source->result_class; - #warn "$moniker $class $source ".$source->storage; + #warn "$source_name $class $source ".$source->storage; $class->mk_classdata(result_source_instance => $source); $class->mk_classdata(resultset_instance => $source->resultset); $class->mk_classdata(class_resolver => $schema); diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 424c9ee..0e83dc6 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -298,7 +298,7 @@ sub create_upgrade_path { =over 4 -=item Returns: a list of version numbers, ordered from lowest to highest +=item Return Value: a list of version numbers, ordered from lowest to highest =back diff --git a/lib/DBIx/Class/Serialize/Storable.pm b/lib/DBIx/Class/Serialize/Storable.pm index a61c221..3d6d539 100644 --- a/lib/DBIx/Class/Serialize/Storable.pm +++ b/lib/DBIx/Class/Serialize/Storable.pm @@ -52,8 +52,8 @@ in its current implementation. Do not use! =head1 DESCRIPTION -This component adds hooks for Storable so that row objects can be -serialized. It assumes that your row object class (C) is +This component adds hooks for Storable so that result objects can be +serialized. It assumes that your result object class (C) is the same as your table class, which is the normal situation. =head1 HOOKS diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 6d26b87..5332582 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -2334,7 +2334,7 @@ sub _select_args { ### # This would be the point to deflate anything found in $where # (and leave $attrs->{bind} intact). Problem is - inflators historically - # expect a row object. And all we have is a resultsource (it is trivial + # expect a result object. And all we have is a resultsource (it is trivial # to extract deflator coderefs via $alias2source above). # # I don't see a way forward other than changing the way deflators are @@ -2641,7 +2641,7 @@ sub is_datatype_numeric { =over 4 -=item Arguments: $schema \@databases, $version, $directory, $preversion, \%sqlt_args +=item Arguments: $schema, \@databases, $version, $directory, $preversion, \%sqlt_args =back @@ -2991,6 +2991,8 @@ sub lag_behind_master { =item Arguments: $relname, $join_count +=item Return Value: $alias + =back L uses L names as table aliases in