diff options
author | Jim Meyering <meyering@redhat.com> | 2008-05-30 09:45:53 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-05-30 09:45:53 +0200 |
commit | fc6827e2bb0a8d4d70c7f399e3b2915654a0c926 (patch) | |
tree | 8af249afa77473e8bf5c4a12f54ff2a3dbdca9f9 /tests | |
parent | 6c9b50532965ef84536b2dcfc4578fbaf9ec38d8 (diff) | |
download | coreutils-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.pm | 4 |
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, $$; |