Class::DBI and its brothers are what you want. I also think that perl does more magic than java, partly becuase perl is more dynamic (despite java's reflection). I did a little meditation on this topic (
). From my rusty memory of EJBs, EJB does bundle more in the same package, e.g., instance pooling, transaction, etc., which is probably why it is so heavy, and easily abused.