From: Simon Cozens <simon@simon-cozens.org>
Date: Tue, 17 Feb 2004 10:30:01 +0000 (+0000)
Subject: Take user and password.
X-Git-Tag: 2.10~298
X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=f9f34047115475e7ca94d8c53273d1b3388cc33d;p=maypole.git

Take user and password.


git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@64 48953598-375a-da11-a14b-00016c27c3ee
---

diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm
index 43b8c7b..b2e5929 100644
--- a/lib/Maypole/Model/CDBI.pm
+++ b/lib/Maypole/Model/CDBI.pm
@@ -101,11 +101,13 @@ sub list :Exported {
 }
 
 sub setup_database {
-    my ($self, $config, $namespace, $dsn) = @_;
+    my ($self, $config, $namespace, $dsn, $u, $p) = @_;
     $config->{dsn} = $dsn;
     $config->{loader} = Class::DBI::Loader->new(
         namespace => $namespace,
-        dsn => $dsn
+        dsn => $dsn,
+        user => $u,
+        password => $p,
     );
     $config->{classes} = [ $config->{loader}->classes ];
     $config->{tables}  = [ $config->{loader}->tables ];