X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDirHandle.pm;h=65250c3f8394f3fb8192170534915f31e7086ebf;hb=2d3232d7d747c33b17a2f963786d0f00484dbad2;hp=047755dc17d2de59190927c702723374baf634cd;hpb=c07a80fdfe3926b5eb0585b674aa5d1f57b32ade;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/DirHandle.pm b/lib/DirHandle.pm index 047755d..65250c3 100644 --- a/lib/DirHandle.pm +++ b/lib/DirHandle.pm @@ -1,5 +1,7 @@ package DirHandle; +our $VERSION = '1.01'; + =head1 NAME DirHandle - supply object methods for directory handles @@ -23,6 +25,20 @@ opendir(), closedir(), readdir(), and rewinddir() functions. The only objective benefit to using C is that it avoids namespace pollution by creating globs to hold directory handles. +=head1 NOTES + +=over 4 + +=item * + +On Mac OS (Classic), the path separator is ':', not '/', and the +current directory is denoted as ':', not '.'. You should be careful +about specifying relative pathnames. While a full path always begins +with a volume name, a relative pathname should always begin with a +':'. If specifying a volume name only, a trailing ':' is required. + +=back + =cut require 5.000; @@ -42,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); }