in reply to Comments on my code, advices how to improve it.
davidrw : As for getting the field names in table, is it necessary?
Well - I usually have something else in my forms than just fields that are in db/table. And this way I just pass it a hashref that I get from CGI.pm "Vars" method as data.
jZed: I see a couple of portability issues. Your connect() syntax is DBDs specific - not all DBDs have things called databases, hosts, ports, in the connect string and if they do, they're not necessarily named the same thing. The problem with the update() and insert() is that you have no way for user to specify bind_params when needed
Yeah - I was thinking of creating DBIx::Handy::MySQL/Whatever. And those would contain specifics for that particular DB type. About binding - haven't used it so far - as I wrote I just pass CGI.pm's output (well actually it goes through Data::FormValidator too).
|
|---|