Debian lenny version packages
[pkg-perl] / deb-src / liburi-perl / liburi-perl-1.35.dfsg.1 / URI / file / OS2.pm
1 package URI::file::OS2;
2
3 require URI::file::Win32;
4 @ISA=qw(URI::file::Win32);
5
6 # The Win32 version translates k:/foo to file://k:/foo  (?!)
7 # We add an empty host
8
9 sub _file_extract_authority
10 {
11     my $class = shift;
12     return $1 if $_[0] =~ s,^\\\\([^\\]+),,;  # UNC
13     return $1 if $_[0] =~ s,^//([^/]+),,;     # UNC too?
14
15     if ($_[0] =~ m#^[a-zA-Z]{1,2}:#) {        # allow for ab: drives
16         return "";
17     }
18     return;
19 }
20
21 sub file {
22   my $p = &URI::file::Win32::file;
23   return unless defined $p;
24   $p =~ s,\\,/,g;
25   $p;
26 }
27
28 1;