4
use Test::More tests => 4;
8
catch Error::Simple with { die "foobar" };
14
ok (scalar($err =~ /foobar/), "Error rethrown");
19
catch Error::Simple with { throw Error::Simple "foobar" };
25
ok (scalar("$err" =~ /foobar/), "Thrown Error::Simple");
30
otherwise { die "foobar" };
36
ok (scalar("$err" =~ /foobar/), "die foobar");
41
catch Error::Simple with { throw Error::Simple "foobar" };
47
ok (scalar($err =~ /foobar/), "throw Error::Simple");