1 package File::Spec::Epoc;
4 use vars qw($VERSION @ISA);
7 $VERSION = eval $VERSION;
9 require File::Spec::Unix;
10 @ISA = qw(File::Spec::Unix);
14 File::Spec::Epoc - methods for Epoc file specs
18 require File::Spec::Epoc; # 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 package is still work in progress ;-)
40 No physical check on the filesystem, but a logical cleanup of a
41 path. On UNIX eliminated successive slashes and successive "/.".
48 my ($self,$path) = @_;
49 return unless defined $path;
51 $path =~ s|/+|/|g; # xx////xx -> xx/xx
52 $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
53 $path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
54 $path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx
55 $path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx
67 Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
69 This program is free software; you can redistribute it and/or modify
70 it under the same terms as Perl itself.
74 See L<File::Spec> and L<File::Spec::Unix>. This package overrides the
75 implementation of these methods, not the semantics.