From a4f20bd4a049fea95268bd80e8fb673a8ca24ff0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Apr 2014 07:37:50 +0000 Subject: [PATCH] t/all: IPC::Run is optional in tests We do not force users to install libraries only needed for testing. --- t/all.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/all.t b/t/all.t index 9698c8e..27fe6c1 100644 --- a/t/all.t +++ b/t/all.t @@ -11,7 +11,11 @@ my $rm = "blib/script/ssoma-rm"; my $tmp = tempdir(CLEANUP => 1); use File::Temp qw/tempdir/; use Email::Simple; -use IPC::Run qw(run); +my $have_ipc_run = eval { + require IC::Run; + import IPC::Run qw/run/; + 1; +}; ok(-x $mda, "$mda is executable"); ok(-x $cli, "$cli is executable"); @@ -197,7 +201,8 @@ EOF } # duplicate detection -{ +SKIP: { + skip "IPC::Run not available", 2 unless $have_ipc_run; my $simple = Email::Simple->new(<<'EOF'); From: moi@example.com To: you@example.com -- 2.26.2