1 package File::Spec::Cygwin;
4 use vars qw(@ISA $VERSION);
5 require File::Spec::Unix;
9 @ISA = qw(File::Spec::Unix);
13 File::Spec::Cygwin - methods for Cygwin file specs
17 require File::Spec::Cygwin; # Done internally by File::Spec if needed
21 See File::Spec::Unix for a documentation of the methods provided
22 there. This package overrides the implementation of these methods, not
25 This module is still in beta. Cygwin-knowledgeable folks are invited
26 to offer patches and suggestions.
34 Any C<\> (backslashes) are converted to C</> (forward slashes),
35 and then File::Spec::Unix canonpath() is called on the result.
42 return $self->SUPER::canonpath($path);
47 =item file_name_is_absolute
49 True is returned if the file name begins with C<drive_letter:>,
50 and if not, File::Spec::Unix file_name_is_absolute() is called.
55 sub file_name_is_absolute {
56 my ($self,$file) = @_;
57 return 1 if $file =~ m{^([a-z]:)?[\\/]}is; # C:/test
58 return $self->SUPER::file_name_is_absolute($file);
61 =item tmpdir (override)
63 Returns a string representation of the first existing directory
64 from the following list:
70 Since Perl 5.8.0, if running under taint mode, and if the environment
71 variables are tainted, they are not used.
77 return $tmpdir if defined $tmpdir;
79 $tmpdir = $self->_tmpdir( $ENV{TMPDIR}, "/tmp", 'C:/temp' );