| 1 | package File::Spec::Cygwin;
|
|---|
| 2 |
|
|---|
| 3 | use strict;
|
|---|
| 4 | use vars qw(@ISA $VERSION);
|
|---|
| 5 | require File::Spec::Unix;
|
|---|
| 6 |
|
|---|
| 7 | $VERSION = '1.1';
|
|---|
| 8 |
|
|---|
| 9 | @ISA = qw(File::Spec::Unix);
|
|---|
| 10 |
|
|---|
| 11 | =head1 NAME
|
|---|
| 12 |
|
|---|
| 13 | File::Spec::Cygwin - methods for Cygwin file specs
|
|---|
| 14 |
|
|---|
| 15 | =head1 SYNOPSIS
|
|---|
| 16 |
|
|---|
| 17 | require File::Spec::Cygwin; # Done internally by File::Spec if needed
|
|---|
| 18 |
|
|---|
| 19 | =head1 DESCRIPTION
|
|---|
| 20 |
|
|---|
| 21 | See L<File::Spec> and L<File::Spec::Unix>. This package overrides the
|
|---|
| 22 | implementation of these methods, not the semantics.
|
|---|
| 23 |
|
|---|
| 24 | This module is still in beta. Cygwin-knowledgeable folks are invited
|
|---|
| 25 | to offer patches and suggestions.
|
|---|
| 26 |
|
|---|
| 27 | =cut
|
|---|
| 28 |
|
|---|
| 29 | =pod
|
|---|
| 30 |
|
|---|
| 31 | =over 4
|
|---|
| 32 |
|
|---|
| 33 | =item canonpath
|
|---|
| 34 |
|
|---|
| 35 | Any C<\> (backslashes) are converted to C</> (forward slashes),
|
|---|
| 36 | and then File::Spec::Unix canonpath() is called on the result.
|
|---|
| 37 |
|
|---|
| 38 | =cut
|
|---|
| 39 |
|
|---|
| 40 | sub canonpath {
|
|---|
| 41 | my($self,$path) = @_;
|
|---|
| 42 | $path =~ s|\\|/|g;
|
|---|
| 43 | return $self->SUPER::canonpath($path);
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
|
|---|