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