From 661707e7bd4282aeab5a2f6a8f02ca5731fd813f Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 8 May 2012 18:20:12 +0000 Subject: Imported from /srv/lorry/lorry-area/error-perl-tarball/Error-0.17018.tar.gz. --- t/01throw.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 t/01throw.t (limited to 't/01throw.t') diff --git a/t/01throw.t b/t/01throw.t new file mode 100644 index 0000000..a1bdba2 --- /dev/null +++ b/t/01throw.t @@ -0,0 +1,25 @@ + +use Error qw(:try); + +print "1..4\n"; + +try { + print "ok 1\n"; +}; + + +try { + throw Error::Simple("ok 2\n",2); + print "not ok 2\n"; +} +catch Error::Simple with { + my $err = shift; + print "$err"; +} +finally { + print "ok 3\n"; +}; + +$err = prior Error; + +print "ok ",2+$err,"\n";; -- cgit v1.2.1