On 9/25/05, Paulo Silva <[EMAIL PROTECTED]> wrote:
> On Sun, 2005-09-25 at 14:01 +0100, David Baird wrote:
> > On 9/25/05, Paulo Silva <[EMAIL PROTECTED]> wrote:
> > That's pretty weird. Your setup call looks like this:
> >
> > CD->setup('dbi:Pg:dbname=xxxx', 'xxxx', 'xxxx', {AutoCommit => 1});
> >
> > including the curly braces?
>
> Yes
>
> > What version of Maypole are you using? There was a bug in a previous
> > version that could have caused this behaviour.
>
> Maypole => 2.10
> Class::DBI::Loader => 0.22
>
> In my version I think the error is in the Maypole::Model::CDBI class.
>
> The setup_database sub creates a new Class::DBI::Loader with:
>
> $config->loader || $config->loader(
> Class::DBI::Loader->new(
> namespace => $namespace,
> dsn => $dsn,
> user => $u,
> password => $p,
> %$opts,
> )
> );
>
> but after viewing the new method at Class::DBI::Loader::Generic I think
> it should be something like this:
>
> $config->loader || $config->loader(
> Class::DBI::Loader->new(
> namespace => $namespace,
> dsn => $dsn,
> user => $u,
> password => $p,
> options => $opts,
> )
> );
>
Ahah, I see. That was a fix supplied by me a while ago :-). The
problem was that CDBI::Loader takes lots of additional useful options,
which you can pass in the call to setup(), but the old calling
convention blocked that. What you need to say is
CD->setup('dbi:Pg:dbname=xxxx', 'xxxx', 'xxxx', { options =>
{AutoCommit => 1} } );
Pretty sucky, but this way you can pass other CDBI::Loader arguments
in the href.
I'll file a bug report to fix the docs. Who knows, we might even get
round to actually fixing the docs one day...
d.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users