[Bast-commits] r7298 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Aug 11 07:52:04 GMT 2009
Author: ribasushi
Date: 2009-08-11 07:52:03 +0000 (Tue, 11 Aug 2009)
New Revision: 7298
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Intro.pod
Log:
Extra intro pod
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Intro.pod
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Intro.pod 2009-08-10 22:48:53 UTC (rev 7297)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Intro.pod 2009-08-11 07:52:03 UTC (rev 7298)
@@ -200,9 +200,13 @@
=head2 Connecting
-To connect to your Schema, you need to provide the connection details. The
-arguments are the same as for L<DBI/connect>:
+To connect to your Schema, you need to provide the connection details or a
+database handle.
+=head3 Via connection details
+
+The arguments are the same as for L<DBI/connect>:
+
my $schema = My::Schema->connect('dbi:SQLite:/home/me/myapp/my.db');
You can create as many different schema instances as you need. So if you have a
@@ -227,6 +231,16 @@
See L<DBIx::Class::Schema::Storage::DBI/connect_info> for more information about
this and other special C<connect>-time options.
+=head3 Via a database handle
+
+The supplied coderef is expected to return a single connected database handle
+(e.g. a L<DBI> C<$dbh>)
+
+ my $schema = My::Schema->connect (
+ sub { Some::DBH::Factory->connect },
+ \%extra_attrs,
+ );
+
=head2 Basic usage
Once you've defined the basic classes, either manually or using
More information about the Bast-commits
mailing list