From: Peter Rabbitson Date: Tue, 11 Aug 2009 07:52:03 +0000 (+0000) Subject: Extra intro pod X-Git-Tag: v0.08109~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ba55998335c62c6d8b7378210316bc1a46c3269;p=dbsrgits%2FDBIx-Class.git Extra intro pod --- diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index dd37d0e..3a275e6 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -200,8 +200,12 @@ many options. =head2 Connecting -To connect to your Schema, you need to provide the connection details. The -arguments are the same as for L: +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: my $schema = My::Schema->connect('dbi:SQLite:/home/me/myapp/my.db'); @@ -227,6 +231,16 @@ a special fifth argument to connect: See L for more information about this and other special C-time options. +=head3 Via a database handle + +The supplied coderef is expected to return a single connected database handle +(e.g. a L 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