]> git.sur5r.net Git - i3/i3/commitdiff
tests: eliminate Try::Tiny
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 5 Oct 2011 22:21:23 +0000 (23:21 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 5 Oct 2011 22:21:23 +0000 (23:21 +0100)
testcases/complete-run.pl
testcases/lib/i3test.pm

index db797bd20a6e52ed9ee8939e1ffdee2c792337b0..c8c67a9a13ccd6cac332ed9b9b35b8cb383701a7 100755 (executable)
@@ -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;
index 7eea384d55834a7a1a8dd10fecb19097a8169e03..67a7db73642f9045e3b5fcfb2fc7eaeb60ca2c9d 100644 (file)
@@ -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;