From b9224634dd4ed5fba9675068aba097a0d232e4e3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 5 Oct 2011 23:21:23 +0100 Subject: [PATCH] tests: eliminate Try::Tiny --- testcases/complete-run.pl | 3 +-- testcases/lib/i3test.pm | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index db797bd2..c8c67a9a 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -31,7 +31,6 @@ use EV; use AnyEvent; use AnyEvent::Handle; use AnyEvent::I3 qw(:all); -use Try::Tiny; # not in core use X11::XCB; # install a dummy CHLD handler to overwrite the CHLD handler of AnyEvent / EV @@ -159,7 +158,7 @@ sub take_job { # files are not written) and fallback to killing it if ($coverage_testing) { my $exited = 0; - try { + eval { say "Exiting i3 cleanly..."; i3("/tmp/nested-$display")->command('exit')->recv; $exited = 1; diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 7eea384d..67a7db73 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -11,7 +11,6 @@ use EV; use List::Util qw(first); use List::MoreUtils qw(lastval); use Time::HiRes qw(sleep); -use Try::Tiny; use Cwd qw(abs_path); use SocketActivation; @@ -374,7 +373,7 @@ sub exit_gracefully { $socketpath ||= get_socket_path(); my $exited = 0; - try { + eval { say "Exiting i3 cleanly..."; i3($socketpath)->command('exit')->recv; $exited = 1; -- 2.39.5