Commit | Line | Data |
ecf68df6 |
1 | package File::Spec::Cygwin; |
2 | |
3 | use strict; |
4 | use vars qw(@ISA $VERSION); |
5 | require File::Spec::Unix; |
6 | |
7 | $VERSION = '1.0'; |
8 | |
9 | @ISA = qw(File::Spec::Unix); |
10 | |
11 | sub canonpath { |
12 | my($self,$path) = @_; |
13 | $path =~ s|\\|/|g; |
14 | return $self->SUPER::canonpath($path); |
15 | } |
16 | |
3ed25742 |
17 | sub file_name_is_absolute { |
18 | my ($self,$file) = @_; |
19 | return 1 if $file =~ m{^([a-z]:)?[\\/]}is; # C:/test |
20 | return $self->SUPER::file_name_is_absolute($file); |
21 | } |
22 | |
ecf68df6 |
23 | 1; |
24 | __END__ |
25 | |
26 | =head1 NAME |
27 | |
28 | File::Spec::Cygwin - methods for Cygwin file specs |
29 | |
30 | =head1 SYNOPSIS |
31 | |
32 | require File::Spec::Cygwin; # Done internally by File::Spec if needed |
33 | |
34 | =head1 DESCRIPTION |
35 | |
36 | See File::Spec::Unix for a documentation of the methods provided |
37 | there. This package overrides the implementation of these methods, not |
38 | the semantics. |
39 | |
40 | This module is still in beta. Cygwin-knowledgeable folks are invited |
41 | to offer patches and suggestions. |