URI/file/OS2.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 35 CC 5 SCAR 23.9
CC
5
Cov
0%
_file_extract_authority
20.0
file
6.0
BEGIN
2.0
CRAP 10.9
1 package URI::file::OS2;
2  
3 use strict;
4 use warnings;
5  
6 use parent 'URI::file::Win32';
7  
8 our $VERSION = '5.40';
9  
10 # The Win32 version translates k:/foo to file://k:/foo (?!)
11 # We add an empty host
12  
13 sub _file_extract_authority {
14 shift; # $class
15 return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC
16 return $1 if $_[0] =~ s,^//([^/]+),,; # UNC too?
17  
18 if ($_[0] =~ m#^[a-zA-Z]{1,2}:#) { # allow for ab: drives
19 return "";
20 }
21 return;
22 }
23  
24 sub file {
25 my $p = &URI::file::Win32::file;
26 return unless defined $p;
27 $p =~ s,\\,/,g;
28 $p;
29 }
30  
31 1;