title: Perl Model class for both ORM and web forms
body: <p>Is there a perl module or a framework which will let me define my data model for both database and web forms in one place? </p>
  
  <p>Something like a fusion of Class::DBI with CGI::Formbuilder?</p>
  
  <p>So that I'll be able to define my data classes, their relationships, fields and validation rules in one place and it will "magically" create/alter database schema for me, generate forms on the fly and validate user input.</p>
  
  <p>I'm considering to use Dancer or Mojolicious as a web framework, but still struggling on which model classes to choose.</p>
  
  <p>Many thanks.</p>