[perl #117743] don't warn on $@ = undef; die;

and fix the test that's meant to detect this bug.