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 L<File::Spec> and L<File::Spec::Unix>. This package overrides the
22 implementation of these methods, not the semantics.
24 This module is still in beta. Cygwin-knowledgeable folks are invited
25 to offer patches and suggestions.
33 Any C<\> (backslashes) are converted to C</> (forward slashes),
34 and then File::Spec::Unix canonpath() is called on the result.
41 return $self->SUPER::canonpath($path);
46 =item file_name_is_absolute
48 True is returned if the file name begins with C<drive_letter:>,
49 and if not, File::Spec::Unix file_name_is_absolute() is called.
54 sub file_name_is_absolute {
55 my ($self,$file) = @_;
56 return 1 if $file =~ m{^([a-z]:)?[\\/]}is; # C:/test
57 return $self->SUPER::file_name_is_absolute($file);
60 =item tmpdir (override)
62 Returns a string representation of the first existing directory
63 from the following list:
69 Since Perl 5.8.0, if running under taint mode, and if the environment
70 variables are tainted, they are not used.
76 return $tmpdir if defined $tmpdir;
78 $tmpdir = $self->_tmpdir( $ENV{TMPDIR}, "/tmp", 'C:/temp' );