[Bast-commits] r5744 - DBIx-Class/0.08/trunk/lib/DBIx/Class

castaway at dev.catalyst.perl.org castaway at dev.catalyst.perl.org
Thu Mar 12 20:24:55 GMT 2009


Author: castaway
Date: 2009-03-12 20:24:55 +0000 (Thu, 12 Mar 2009)
New Revision: 5744

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
Log:
Document how to overload connect/connection


Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2009-03-12 18:35:16 UTC (rev 5743)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2009-03-12 20:24:55 UTC (rev 5744)
@@ -483,6 +483,12 @@
 C<connect> does not. C<connect> wraps it's arguments in an arrayref
 before passing them to C<connect_info>.
 
+=head3 Overloading
+
+C<connect> is a convenience method. It is equivalent to calling
+$schema->clone->connection(@connectinfo). To write your own overloaded
+version, overload L</connection> instead.
+
 =cut
 
 sub connect { shift->clone->connection(@_) }
@@ -760,7 +766,10 @@
 data in-place on the Schema class. You should probably be calling
 L</connect> to get a proper Schema object instead.
 
+=head3 Overloading
 
+Overload C<connection> to change the behaviour of C<connect>.
+
 =cut
 
 sub connection {




More information about the Bast-commits mailing list