in reply to $dbh->prepare not triggering die

Try checking for the value of $dbh->errstr after doing the prepare. If it is defined, something went wrong and you can safely die ;-)
my $sth = $dbh->prepare($sql); unless ($dbh->errstr){die "Something went wrong".$dbh->errstr;} ...
This also works after an execute, by the way.