changed formatting for arguments/return values in method docs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSet.pm
index 461a837..093a456 100644 (file)
@@ -53,7 +53,11 @@ In the examples below, the following table classes are used:
 
 =head2 new
 
-=head3 Arguments: ($source, \%$attrs)
+=over 4
+
+=item Arguments: ($source, \%$attrs)
+
+=back
 
 The resultset constructor. Takes a source object (usually a
 L<DBIx::Class::ResultSourceProxy::Table>) and an attribute hash (see
@@ -232,7 +236,11 @@ sub search_literal {
 
 =head2 find
 
-=head3 Arguments: (@colvalues) | (\%cols, \%attrs?)
+=over 4
+
+=item Arguments: (@colvalues) | (\%cols, \%attrs?)
+
+=back
 
 Finds a row based on its primary key or unique constraint. For example:
 
@@ -368,7 +376,11 @@ sub search_like {
 
 =head2 slice
 
-=head3 Arguments: ($first, $last)
+=over 4
+
+=item Arguments: ($first, $last)
+
+=back
 
 Returns a subset of elements from the resultset.
 
@@ -633,7 +645,11 @@ sub first {
 
 =head2 update
 
-=head3 Arguments: (\%values)
+=over 4
+
+=item Arguments: (\%values)
+
+=back
 
 Sets the specified columns in the resultset to the supplied values.
 
@@ -644,12 +660,17 @@ sub update {
   $self->throw_exception("Values for update must be a hash")
     unless ref $values eq 'HASH';
   return $self->result_source->storage->update(
-           $self->result_source->from, $values, $self->{cond});
+    $self->result_source->from, $values, $self->{cond}
+  );
 }
 
 =head2 update_all
 
-=head3 Arguments: (\%values)
+=over 4
+
+=item Arguments: (\%values)
+
+=back
 
 Fetches all objects and updates them one at a time.  Note that C<update_all>
 will run cascade triggers while L</update> will not.
@@ -705,9 +726,11 @@ sub delete {
         $del->{$1} = $self->{cond}{$key};
       }
     }
+
   } else {
     $self->throw_exception(
-      "Can't delete on resultset with condition unless hash or array");
+      "Can't delete on resultset with condition unless hash or array"
+    );
   }
 
   $self->result_source->storage->delete($self->result_source->from, $del);
@@ -746,7 +769,11 @@ sub pager {
 
 =head2 page
 
-=head3 Arguments: ($page_num)
+=over 4
+
+=item Arguments: ($page_num)
+
+=back
 
 Returns a new resultset for the specified page.
 
@@ -761,7 +788,11 @@ sub page {
 
 =head2 new_result
 
-=head3 Arguments: (\%vals)
+=over 4
+
+=item Arguments: (\%vals)
+
+=back
 
 Creates a result in the resultset's result class.
 
@@ -786,7 +817,11 @@ sub new_result {
 
 =head2 create
 
-=head3 Arguments: (\%vals)
+=over 4
+
+=item Arguments: (\%vals)
+
+=back
 
 Inserts a record into the resultset and returns the object.
 
@@ -803,7 +838,11 @@ sub create {
 
 =head2 find_or_create
 
-=head3 Arguments: (\%vals, \%attrs?)
+=over 4
+
+=item Arguments: (\%vals, \%attrs?)
+
+=back
 
   $class->find_or_create({ key => $val, ... });
 
@@ -993,6 +1032,8 @@ sub throw_exception {
 
 =head1 ATTRIBUTES
 
+XXX: FIXME: Attributes docs need clearing up
+
 The resultset takes various attributes that modify its behavior. Here's an
 overview of them:
 
@@ -1004,7 +1045,11 @@ descending order on the column `year'.
 
 =head2 columns
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@columns)
+
+=back
 
 Shortcut to request a particular set of columns to be retrieved.  Adds
 C<me.> onto the start of any column without a C<.> in it and sets C<select>
@@ -1013,7 +1058,11 @@ use the C<cols> attribute, as in earlier versions of DBIC.)
 
 =head2 include_columns
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@columns)
+
+=back
 
 Shortcut to include additional columns in the returned results - for example
 
@@ -1027,7 +1076,11 @@ passed to object inflation
 
 =head2 select
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@columns)
+
+=back
 
 Indicates which columns should be selected from the storage. You can use
 column names, or in the case of RDBMS back ends, function or stored procedure
@@ -1047,7 +1100,11 @@ return a column named C<count(employeeid)> in the above example.
 
 =head2 as
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@names)
+
+=back
 
 Indicates column names for object inflation. This is used in conjunction with
 C<select>, usually when C<select> contains one or more function or stored
@@ -1126,7 +1183,11 @@ below.
 
 =head2 prefetch
 
-=head3 Arguments: arrayref/hashref
+=over 4
+
+=item Arguments: (\@relationships)
+
+=back
 
 Contains one or more relationships that should be fetched along with the main 
 query (when they are accessed afterwards they will have already been
@@ -1163,7 +1224,11 @@ with an accessor type of 'single' or 'filter').
 
 =head2 from
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@array)
+
+=back
 
 The C<from> attribute gives you manual control over the C<FROM> clause of SQL
 statements generated by L<DBIx::Class>, allowing you to express custom C<JOIN>
@@ -1252,12 +1317,24 @@ with a father in the person table, we could explicitly use C<INNER JOIN>:
 
 =head2 page
 
+=over 4
+
+=item Arguments: ($page)
+
+=back
+
 For a paged resultset, specifies which page to retrieve.  Leave unset
 for an unpaged resultset.
 
 =head2 rows
 
-For a paged resultset, how many rows per page:
+=over 4
+
+=item Arguments: ($rows)
+
+=back
+
+For a paged resultset, specifies how many rows are in each page:
 
   rows => 10
 
@@ -1265,7 +1342,11 @@ Can also be used to simulate an SQL C<LIMIT>.
 
 =head2 group_by
 
-=head3 Arguments: (arrayref)
+=over 4
+
+=item Arguments: (\@columns)
+
+=back
 
 A arrayref of columns to group by. Can include columns of joined tables.