From: Jim Meyering Date: Fri, 30 May 2008 07:45:53 +0000 (+0200) Subject: tests: avoid failure with older version of Perl's File::Temp X-Git-Tag: v6.12~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc6827e2bb0a8d4d70c7f399e3b2915654a0c926;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm index e21306a57c..a7dd8b6a80 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, $$;