$id = $obj->create({id =>999, number_of_days_on_the_job=>3, number_of_people_shot=>12}); $error_string = $id unless $id == 999; # overide default die behavour and # return the error message if it fails constraints # for HTML::Template to 'associate' with $obj->param('number_of_people_shot'); print "The known fields are ".$obj->param()."\n"; %errors = $obj->set( number_of_days_on_the_job => 4, number_of_people_shot => 27); # or more to the point %errors = $obj->set( $CGI->Vars ); # i.e. don't die! also # don't update any of the values if there are any errors. # and collect errors in hash for each error. print $error{number_of_people_shot} if $error{number_of_people_shot} exists; ($dead, $x, $days) = $obj->get( number_of_days_on_the_job, x, number_of_people_shot); # NOTE x is not in the table print $x # prints some nonsense about that it - 'cant get nothing'