One of the contractors I work with has a sourceforge project that does this - xml to java/perl/etc. It's available at
http://sourceforge.net/projects/sysmod.
The perl it's generating doesn't look like it's handling inheritence properly, and it's not generating DBI calls like it does for java, but you may still find it usable/a place to start.
Comment on Re: automated conversion from XML Schema to Perl OO