blib/lib/Perlmazing/Perlmazing/unix_path.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 3 SCAR 20.8
CC
3
Cov
0%
main
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 use Perlmazing qw(splitdir);
2 our @ISA = qw(Perlmazing::Listable);
3 require File::Spec::Unix;
4  
5 sub main {
6 $_[0] = length($_[0]) ? File::Spec::Unix->catdir(splitdir $_[0]) : File::Spec::Unix->catdir('.');
7 # Fix possible UNC paths
8 $_[0] =~ s/^\\\\(\w+)/\/\/$1/ if length $_[0];
9 }
10  
11 1;