From: Steve Peters Date: Wed, 4 Jan 2006 12:19:49 +0000 (+0000) Subject: Don't warn about invalid dirhandles in DirHandle::DESTROY(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=28ee7c3974ce583dcf5abef3b1a6b1835bcb2db7;p=p5sagit%2Fp5-mst-13.2.git Don't warn about invalid dirhandles in DirHandle::DESTROY(). p4raw-id: //depot/perl@26638 --- diff --git a/lib/DirHandle.pm b/lib/DirHandle.pm index 1d25969..65250c3 100644 --- a/lib/DirHandle.pm +++ b/lib/DirHandle.pm @@ -1,6 +1,6 @@ package DirHandle; -our $VERSION = '1.00'; +our $VERSION = '1.01'; =head1 NAME @@ -58,6 +58,9 @@ 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. + no warnings 'io'; closedir($dh); }