X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSet.pm;h=f1ca4408c4edfffc75bc4cc175352b1de1b9788e;hb=181a28f4e04c13a37fe4a5b6357d85e1da63dbc4;hp=5d6f6014455d6b2d292859435922190639c9c786;hpb=ebaefbc2d27ee15e14f8d509346658376925f152;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 5d6f601..f1ca440 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -55,7 +55,7 @@ In the examples below, the following table classes are used: =head3 Arguments: ($source, \%$attrs) The resultset constructor. Takes a source object (usually a -L) and an attribute hash (see L +L) and an attribute hash (see L below). Does not perform any queries -- these are executed as needed by the other methods. @@ -186,7 +186,7 @@ Pass a literal chunk of SQL to be added to the conditional part of the resultset. =cut - + sub search_literal { my ($self, $cond, @vals) = @_; my $attrs = (ref $vals[$#vals] eq 'HASH' ? { %{ pop(@vals) } } : {}); @@ -205,7 +205,7 @@ Finds a row based on its primary key or unique constraint. For example: Also takes an optional C attribute, to search by a specific key or unique constraint. For example: - my $cd = $schema->resultset('CD')->find_or_create( + my $cd = $schema->resultset('CD')->find( { artist => 'Massive Attack', title => 'Mezzanine', @@ -638,8 +638,8 @@ sub create { $class->find_or_create({ key => $val, ... }); -Searches for a record matching the search condition; if it doesn't find one, -creates one and returns that instead. +Searches for a record matching the search condition; if it doesn't find one, +creates one and returns that instead. my $cd = $schema->resultset('CD')->find_or_create({ cdid => 5, @@ -974,7 +974,7 @@ then search against all mothers of those children: ] ], { 'mother.person_id' => 'child.mother_id' } - ], + ], ] }, );