avoid eval misinterpretation on old perls

An eval-BLOCK in the Carp test suite is misinterpreted by perl 5.6 as an
eval-STRING.  Add a do-BLOCK wrapper inside the block to satisfy perl 5.6.