Psh/Builtins/Drives.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 14 CC 2 SCAR 15.4
CC
2
Cov
0%
bi_drives
6.0
BEGIN
2.0
CRAP 4.7
1 package Psh::Builtins::Drives;
2  
3 require Psh::Util;
4  
5 =item * C<drives>
6  
7 Prints a list of the available drives on Windows or nothing on windows
8  
9 =cut
10  
11  
12 sub bi_drives
13 {
14 if ($^O eq 'MSWin32') {
15 # I do not particularly like platform dependant code here
16 # On the other hand I also dislike filling the Psh::OS module
17 # with stuff for highly optional builtins
18 my @result=();
19 eval "use Win32::NetAdmin;";
20 Win32::NetAdmin::GetServerDisks("",\@result);
21 Psh::Util::print_out($_."\n") foreach @result;
22 } else {
23 }
24 return (1,undef);
25 }
26  
27 1;