From: Johannes Plunien Date: Sun, 14 Jun 2009 16:46:32 +0000 (+0000) Subject: POD fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fe3df202cc45fe6080e9aca15e9cd124c917306b;p=dbsrgits%2FDBIx-Class-ResultSet-HashRef.git POD fix --- diff --git a/lib/DBIx/Class/ResultSet/HashRef.pm b/lib/DBIx/Class/ResultSet/HashRef.pm index c49fd1e..dba82d5 100644 --- a/lib/DBIx/Class/ResultSet/HashRef.pm +++ b/lib/DBIx/Class/ResultSet/HashRef.pm @@ -86,7 +86,21 @@ sub hashref_first { =head2 hashref_pk( ) -Calls L and returns a reference to a hash containing the primary key. For each key the corresponding value is a reference to a hash of the resultset inflated by L. +Returns a hash or reference to hash, depending on the calling context. The keys of the hash are +the primary keys of each row return by L: + + { + 1 => { + 'id' => '1', + 'login' => 'root' + }, + 2 => { + 'id' => '2', + 'login' => 'toor' + }, + } + +Example usage: my $hashref_pk = $schema->resultset('User')->search( { } )->hashref_pk; print Dumper $hashref_pk