in reply to Testing error handling that calls "die"

I use eval, $@ and Test::More::like() in my CPAN modules. Here is a snippet from one of my tests:
# Check error messages $@ = ''; eval { my $str = format_eng() }; like($@, qr/requires numeric input/, 'die if no input'); $@ = ''; eval { my $str = format_eng(' ') }; like($@, qr/not numeric/, 'die if input only has whitespace');