]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/CDBI.pm
small fixes from peter
[maypole.git] / lib / Maypole / Model / CDBI.pm
index a200fc5851d174dffb6e2b86dff92311ac9fedda..a62c8fcde8d1e11b84213ef3a931a3339c4dfb19 100644 (file)
@@ -36,6 +36,8 @@ use Class::DBI::Pager;
 use Lingua::EN::Inflect::Number qw(to_PL);
 use attributes ();
 
+use Data::Dumper;
+
 ###############################################################################
 # Helper methods
 
@@ -112,7 +114,8 @@ sub _do_update_or_create {
 
   my $fatal;
   my $creating = 0;
-  my $h = CGI::Untaint::Maypole->new( %{$r->params} );
+
+  my $h = CGI::Untaint->new( %{$r->params} );
 
   # update or create
   if ($obj) {
@@ -580,7 +583,9 @@ sub setup_database {
     );
     $config->{classes} = [ $config->{loader}->classes ];
     $config->{tables}  = [ $config->{loader}->tables ];
-    warn( 'Loaded tables: ' . join ',', @{ $config->{tables} } )
+
+    my @table_class = map { $_ . " => " . $config->{loader}->_table2class($_) } @{ $config->{tables} };
+    warn( 'Loaded tables to classes: ' . join ', ', @table_class )
       if $namespace->debug;
 }