1package URI::file::OS2; 2 3use strict; 4use warnings; 5 6use parent 'URI::file::Win32'; 7 8our $VERSION = '5.10'; 9 10# The Win32 version translates k:/foo to file://k:/foo (?!) 11# We add an empty host 12 13sub _file_extract_authority 14{ 15 my $class = shift; 16 return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC 17 return $1 if $_[0] =~ s,^//([^/]+),,; # UNC too? 18 19 if ($_[0] =~ m#^[a-zA-Z]{1,2}:#) { # allow for ab: drives 20 return ""; 21 } 22 return; 23} 24 25sub file { 26 my $p = &URI::file::Win32::file; 27 return unless defined $p; 28 $p =~ s,\\,/,g; 29 $p; 30} 31 321; 33