From: Arthur Axel 'fREW' Schmidt Date: Fri, 28 May 2010 04:52:20 +0000 (-0500) Subject: S::L code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c732188049a5a831b3e72bec079857fb56445705;p=dbsrgits%2Fdbix-class-introduction-presentation.git S::L code --- diff --git a/slideshow.html b/slideshow.html index 18f214b..ad49e67 100644 --- a/slideshow.html +++ b/slideshow.html @@ -393,12 +393,21 @@ __PACKAGE__->belongs_to( author =>
-

too much typing! too much maintenance!

-
- -

Schema::Loader

-
code for S::L here
+

DB -> Perl vs Perl -> DB

+
package MyApp::Schema;
+use strict; use warnings;
+use base 'DBIx::Class::Schema::Loader';
+__PACKAGE__->loader_options({
+   naming => 'v7',
+   debug  => $ENV{DBIC_TRACE},
+});
+1;
+
+# elsewhere...
+
+my $schema = MyApp::Schema->connect($dsn, $user, $pass);
+