URI/file/FAT.pm

filter: Statementstmt 100% 21 / 21 Branchbran 75.0% 6 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 91.1% 31 / 34 CC 6 SCAR 14.7
CC
6
Cov
93%
fix_path
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.4
« URI/gopher.pm ↑ Summary URI/URL.pm »
1 package URI::file::FAT;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent 'URI::file::Win32';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '5.40';
9  
10 2 ▶sub fix_path {
Subroutine fix_path: called CC=6 SCAR=18.0
Pod undocumented
11 2 shift; # class
12 2 for (@_) {
13  
14 # turn it into 8.3 names
15 6 my @p = map uc, split(/\./, $_, -1);
16 6 ▶ return if @p > 2; # more than 1 dot is not allowed
Branch: 1 branch
BranchTrueFalseTotal
if @p > 2 0 6 6
17 6 ▶ @p = ("") unless @p; # split bug? (returns nothing when splitting "")
Branch: 1 branch
BranchTrueFalseTotal
unless @p 1 5 6
18 6 $_ = substr($p[0], 0, 8);
19 6 ▶ if (@p > 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p > 1) 1 5 6
20 1 my $ext = substr($p[1], 0, 3);
21 1 ▶ $_ .= ".$ext" if length $ext;
Branch: 1 branch
BranchTrueFalseTotal
if length $ext 1 0 1
22 }
23 }
24 2 1; # ok
25 }
26  
27 1 1;
« URI/gopher.pm ↑ Summary URI/URL.pm »