]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/CDBI/FromCGI.pm
minor bug fixes.
[maypole.git] / lib / Maypole / Model / CDBI / FromCGI.pm
index c5ad4582ea3992dd89fa38560d7e9433fd7dcc15..9baaf9efe916c3117a44b60ae7cc0ffb7781ccad 100644 (file)
@@ -1,5 +1,6 @@
 package Maypole::Model::CDBI::FromCGI;
 use strict;
+use warnings;
 
 =head1 NAME
 
@@ -29,7 +30,6 @@ on Class::DBI::FromCGI.
 
 =cut
 
-use warnings;
 
 # The base base model class for apps 
 # provides good search and create functions
@@ -233,7 +233,6 @@ sub add_to_from_cgi {
     unless ref $self;
   my ($errors, $validated, @created);
    
-  
   my $params = $opts->{params} || $r->params;
   $opts->{params} = $self->classify_form_inputs($params);
   ($validated, $errors) = $self->validate_all($r, $opts);
@@ -379,9 +378,7 @@ sub validate_inputs {
 
     # Required field error 
     if ($required{$field} and !ref($value) and $err =~ /^No input for/) {
-                               #($value eq '' or !defined $value)) 
       $errors->{$field} = "You must supply '$field'" 
-       #unless ($updating and$self->field;
     } elsif ($err) {
 
       # 1: No inupt entered