Permalink
Browse files

tmpdir for Win32

  • Loading branch information...
1 parent 48c93d7 commit ad3ec4d5babe3c4f2fd6b101025932375c67a0f2 @FROGGS committed Sep 13, 2012
Showing with 19 additions and 2 deletions.
  1. +19 −2 lib/File/Spec/Win32.pm
View
@@ -1,9 +1,26 @@
module File::Spec::Win32;
+BEGIN require "File::Spec::Unix";
+
role File::Spec::OS {
- method curdir {
- '.'
+ # use Unix as a base
+ also does File::Spec::Unix;
+
+ # and add Win32 specific stuff
+ my $tmpdir;
+ method tmpdir {
+ return $tmpdir if $tmpdir.defined;
+ $tmpdir = self._tmpdir(
+ %*ENV{'TMPDIR'},
+ %*ENV{'TEMP'},
+ %*ENV{'TMP'},
+ 'SYS:/temp',
+ 'C:\system\temp',
+ 'C:/temp',
+ '/tmp',
+ '/'
+ );
}
}

0 comments on commit ad3ec4d

Please sign in to comment.