POD patch, corrected erroneous usage of dbh_do in Storage::DBI synopsis
Robert Buels [Wed, 2 Sep 2009 18:33:47 +0000 (18:33 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index d7f1e9e..c3a8e49 100644 (file)
@@ -44,7 +44,14 @@ DBIx::Class::Storage::DBI - DBI storage handler
   my $schema = MySchema->connect('dbi:SQLite:my.db');
 
   $schema->storage->debug(1);
-  $schema->dbh_do("DROP TABLE authors");
+
+  my @stuff = $schema->storage->dbh_do(
+    sub {
+      my ($storage, $dbh, @args) = @_;
+      $dbh->do("DROP TABLE authors");
+    },
+    @column_list
+  );
 
   $schema->resultset('Book')->search({
      written_on => $schema->storage->datetime_parser(DateTime->now)