From fc6827e2bb0a8d4d70c7f399e3b2915654a0c926 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 May 2008 09:45:53 +0200 Subject: tests: avoid failure with older version of Perl's File::Temp * tests/CuTmpdir.pm (import): Use &File::Temp::cleanup only if it is defined. Reported by Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13652 --- tests/CuTmpdir.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm index e21306a57..a7dd8b6a8 100644 --- a/tests/CuTmpdir.pm +++ b/tests/CuTmpdir.pm @@ -82,7 +82,9 @@ sub import { if ($$ == $original_pid and defined $dir) { chmod_tree; - File::Temp::cleanup; + # Older versions of File::Temp lack this method. + exists &File::Temp::cleanup + and &File::Temp::cleanup; } $SIG{$sig} = 'DEFAULT'; kill $sig, $$; -- cgit v1.2.3-54-g00ecf