[Catalyst] Catalyst::Model::CDBI and AutoCommit/autoupdate

Frank Wiegand frank.wiegand at gmail.com
Fri May 20 20:45:40 CEST 2005


Hi,

CDBI.pm's documentation says:

__PACKAGE__->config(
     dsn           => 'dbi:Pg:dbname=myapp',
     password      => '',
     user          => 'postgres',
     options       => { AutoCommit => 1 },
     relationships => 1
);

and it's code:

for my $class ( $self->loader->classes ) {
         $class->autoupdate(1);
...

So the mentioned option does not work.

My suggestion:

--- CDBI.pm.orig        2005-05-20 20:40:13.000000000 +0200
+++ CDBI.pm     2005-05-20 20:40:26.000000000 +0200
@@ -65,7 +65,6 @@
            if $c->debug;
      }
      for my $class ( $self->loader->classes ) {
-        $class->autoupdate(1);
          $c->components->{$class} ||= bless {%$self}, $class;
          no strict 'refs';
          *{"$class\::new"} = sub { bless {%$self}, $class };

Right?


Bye, Frank



More information about the Catalyst mailing list