Fix overload index mismatch in overloading logic.
[p5sagit/p5-mst-13.2.git] / lib / DirHandle.pm
index 1d25969..0bddec2 100644 (file)
@@ -1,6 +1,6 @@
 package DirHandle;
 
-our $VERSION = '1.00';
+our $VERSION = '1.02';
 
 =head1 NAME 
 
@@ -58,6 +58,10 @@ sub new {
 
 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);
 }