summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-05-30 09:45:53 +0200
committerJim Meyering <meyering@redhat.com>2008-05-30 09:45:53 +0200
commitfc6827e2bb0a8d4d70c7f399e3b2915654a0c926 (patch)
tree8af249afa77473e8bf5c4a12f54ff2a3dbdca9f9 /tests
parent6c9b50532965ef84536b2dcfc4578fbaf9ec38d8 (diff)
downloadcoreutils-fc6827e2bb0a8d4d70c7f399e3b2915654a0c926.tar.xz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/CuTmpdir.pm4
1 files changed, 3 insertions, 1 deletions
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, $$;