[Bast-commits] r6677 - DBIx-Class-ResultSet-HashRef/1.000/trunk/lib/DBIx/Class/ResultSet

plu at dev.catalyst.perl.org plu at dev.catalyst.perl.org
Sun Jun 14 16:46:32 GMT 2009


Author: plu
Date: 2009-06-14 16:46:32 +0000 (Sun, 14 Jun 2009)
New Revision: 6677

Modified:
   DBIx-Class-ResultSet-HashRef/1.000/trunk/lib/DBIx/Class/ResultSet/HashRef.pm
Log:
POD fix

Modified: DBIx-Class-ResultSet-HashRef/1.000/trunk/lib/DBIx/Class/ResultSet/HashRef.pm
===================================================================
--- DBIx-Class-ResultSet-HashRef/1.000/trunk/lib/DBIx/Class/ResultSet/HashRef.pm	2009-06-14 16:38:59 UTC (rev 6676)
+++ DBIx-Class-ResultSet-HashRef/1.000/trunk/lib/DBIx/Class/ResultSet/HashRef.pm	2009-06-14 16:46:32 UTC (rev 6677)
@@ -86,8 +86,22 @@
 
 =head2 hashref_pk( )
 
-Calls L</hashref_array( )> 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<DBIx::Class::ResultClass::HashRefInflator>.
+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</hashref_array( )>:
 
+	{
+		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
 




More information about the Bast-commits mailing list