summaryrefslogtreecommitdiff
path: root/lib/URI/file/Unix.pm
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2007-11-11 06:55:13 +0000
committerAndreas Brachold <vdr07@deltab.de>2007-11-11 06:55:13 +0000
commit3282be229999dc36c197b264d63063a18d136331 (patch)
tree98a42db29d955b39e7bed1b599fdcc56c3a29de9 /lib/URI/file/Unix.pm
parentcfdd733c17cfa4f1a43b827a656e9e53cc2524ac (diff)
downloadxxv-3282be229999dc36c197b264d63063a18d136331.tar.gz
xxv-3282be229999dc36c197b264d63063a18d136331.tar.bz2
* Update installation list with required modules
* Remove unused/doubled provided external perl moduls
Diffstat (limited to 'lib/URI/file/Unix.pm')
-rw-r--r--lib/URI/file/Unix.pm55
1 files changed, 0 insertions, 55 deletions
diff --git a/lib/URI/file/Unix.pm b/lib/URI/file/Unix.pm
deleted file mode 100644
index 5f8aaae..0000000
--- a/lib/URI/file/Unix.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-package URI::file::Unix;
-
-require URI::file::Base;
-@ISA=qw(URI::file::Base);
-
-use strict;
-use URI::Escape qw(uri_unescape);
-
-sub _file_extract_path
-{
- my($class, $path) = @_;
-
- # tidy path
- $path =~ s,//+,/,g;
- $path =~ s,(/\.)+/,/,g;
- $path = "./$path" if $path =~ m,^[^:/]+:,,; # look like "scheme:"
-
- return $path;
-}
-
-sub _file_is_absolute {
- my($class, $path) = @_;
- return $path =~ m,^/,;
-}
-
-sub file
-{
- my $class = shift;
- my $uri = shift;
- my @path;
-
- my $auth = $uri->authority;
- if (defined($auth)) {
- if (lc($auth) ne "localhost" && $auth ne "") {
- $auth = uri_unescape($auth);
- unless ($class->_file_is_localhost($auth)) {
- push(@path, "", "", $auth);
- }
- }
- }
-
- my @ps = $uri->path_segments;
- shift @ps if @path;
- push(@path, @ps);
-
- for (@path) {
- # Unix file/directory names are not allowed to contain '\0' or '/'
- return undef if /\0/;
- return undef if /\//; # should we really?
- }
-
- return join("/", @path);
-}
-
-1;