the following error message is being shown in the server error log.

Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at contact line 257., referer: http://example.com/cgi-bin/contact

The two instances of rollback - each within one of two sub routines - are nowhere near line 257. they are in blocks of code which begin at lines 520 and 727 respectively.

All my rollback sections have the disconnect command in them and are copied from the DBI docs at cpan. (well all except for the disconnect, which I have simply put in after the rollback command. How is that wrong, please.

eval {

/code here/

   if ($@) {
      warn "Transaction aborted because $@";  print qq($@);
     eval {
            }; # undo the incomplete changes
      # add other application on-error clean-up code here
(I have also run it with the disconnect command outside the error eval but I continue to get the server logs error).

please help me understand how I should have done it or link me to another good tutorial, please.