I'm trying to put some DBIX transactions under an eval
block to either make all transactions or none if something goes wrong in the middle.
I've got several transactions being done like this and none of them is giving me problems. None but one:
The way I build the transactions is rather tricky and, for what it's worth, these actually work. I can post that chunk of code if you want, but maybe the eval block will suffice:
eval {
for (my $sub = 0; $sub < $neuroexam_index; $sub++){
$transactions{neuroexams}{$sub}->insert;
}
} or die $!;
The problem would be that the eval shows an error ([error] Caught exception in pbitdb::Controller::Subjects->add "Died at /home/lioneluranl/svn/pbitdb/pbitdb/script/../lib/pbitdb/Controller/Subjects.pm line 411."
) in my console, but actually performs the insertions. Why would that be?