From: Chip Salzenberg Date: Wed, 9 Apr 1997 19:48:55 +0000 (+1200) Subject: In IO::File::open, prepend './' less often (for Win32 et al) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1f4739df3b104a71e91e8f6e96c33e6309e06d36;p=p5sagit%2Fp5-mst-13.2.git In IO::File::open, prepend './' less often (for Win32 et al) --- diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index 9d647b3..b1aecff 100644 --- a/ext/IO/lib/IO/File.pm +++ b/ext/IO/lib/IO/File.pm @@ -115,7 +115,7 @@ require DynaLoader; @ISA = qw(IO::Handle IO::Seekable Exporter DynaLoader); -$VERSION = "1.0601"; +$VERSION = "1.0602"; @EXPORT = @IO::Seekable::EXPORT; @@ -165,7 +165,7 @@ sub open { defined $perms or $perms = 0666; return sysopen($fh, $file, $mode, $perms); } - $file = './' . $file unless substr($file, 0, 1) eq '/'; + $file = './' . $file if $file =~ m{\A[^\\/\w]}; $file = IO::Handle::_open_mode_string($mode) . " $file\0"; } open($fh, $file);