1 package URI::file::Unix;
\r
3 require URI::file::Base;
\r
4 @ISA=qw(URI::file::Base);
\r
7 use URI::Escape qw(uri_unescape);
\r
11 my($class, $path) = @_;
\r
14 $path =~ s,(/\.)+/,/,g;
\r
15 $path = "./$path" if $path =~ m,^[^:/]+:,,; # look like "scheme:"
\r
26 my $auth = $uri->authority;
\r
27 if (defined($auth)) {
\r
28 if (lc($auth) ne "localhost") {
\r
29 $auth = uri_unescape($auth);
\r
30 unless ($class->is_this_host($auth)) {
\r
31 push(@path, "", "", $auth);
\r
36 my @ps = $uri->path_segments;
\r
41 # Unix file/directory names are not allowed to contain '\0' or '/'
\r
43 return if /\//; # should we really?
\r