On Thu, Dec 09, 2004 at 11:02:32AM -0500, Jesse Sheidlower wrote:
> On Thu, Dec 09, 2004 at 03:51:52PM +0000, Toby Corkindale wrote:
> > Hi,
> > I'm sorry to bother you all with this, but I've had a fair try and finding
> > it myself with no luck so far.
> >
> > I'm using M-Auth-UserSessionCookie, and I want to use
> > Apache::Session::Postgres with the existing database handle that Maypole
> > will have opened a little earlier in the ->setup() call.
> >
> > A-S-Postgres requires one to pass the Handle => $dbh parameter, where $dbh
> > is the open DBI handle. How can I access that? I've traced as far as that
> > ->loader will contain the Class::DBI::Loader object, which is related, but
> > I don't know how to obtain the DBI handle from it..
>
> MyApp::MyClass->db_Main()
Thanks!
Unfortunately.. I had tried something like that, like so:
EHS::Diesel->setup($config->dsn, $config->dbuser, $config->dbpass,
{ AutoCommit => 1,
PrintError => 1
});
# [snip]
# Setup Auth stuff for M-A-UserSessionCookie:
EHS::Diesel->config->{auth} = {
session_class => 'Apache::Session::Postgres',
session_args => {
Handle => EHS::Diesel->db_Main,
Commit => 1
}
};
-----
[error] Can't locate object method "db_Main" via package "EHS::Diesel" at
/home/tobyc/svn/DieselWorld/lib/Foo/Bar.pm line 34.\nCompilation failed in
require at (eval 6) line 3.\n
Do I need to do something to ensure it's setup by that stage?
thaks,
tjc
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT