summaryrefslogtreecommitdiff
path: root/lib/DirHandle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DirHandle.pm')
-rw-r--r--lib/DirHandle.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/DirHandle.pm b/lib/DirHandle.pm
index 65250c3f83..e8274a81bc 100644
--- a/lib/DirHandle.pm
+++ b/lib/DirHandle.pm
@@ -60,6 +60,7 @@ sub DESTROY {
my ($dh) = @_;
# Don't warn about already being closed as it may have been closed
# correctly, or maybe never opened at all.
+ local($., $@, $!, $^E, $?);
no warnings 'io';
closedir($dh);
}