Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / File / Spec / Epoc.pm
CommitLineData
86530b38
AT
1package File::Spec::Epoc;
2
3our $VERSION = '1.00';
4
5use strict;
6use Cwd;
7use vars qw(@ISA);
8require File::Spec::Unix;
9@ISA = qw(File::Spec::Unix);
10
11=head1 NAME
12
13File::Spec::Epoc - methods for Epoc file specs
14
15=head1 SYNOPSIS
16
17 require File::Spec::Epoc; # Done internally by File::Spec if needed
18
19=head1 DESCRIPTION
20
21See File::Spec::Unix for a documentation of the methods provided
22there. This package overrides the implementation of these methods, not
23the semantics.
24
25This package is still work in progress ;-)
26o.flebbe@gmx.de
27
28
29=over 4
30
31sub case_tolerant {
32 return 1;
33}
34
35=item canonpath()
36
37No physical check on the filesystem, but a logical cleanup of a
38path. On UNIX eliminated successive slashes and successive "/.".
39
40=cut
41
42sub canonpath {
43 my ($self,$path) = @_;
44
45 $path =~ s|/+|/|g; # xx////xx -> xx/xx
46 $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
47 $path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
48 $path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx
49 $path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx
50 return $path;
51}
52
53=back
54
55=head1 SEE ALSO
56
57L<File::Spec>
58
59=cut
60
611;