HTTP/Interface/Fs.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 26 CC 4 SCAR 26.4
CC
4
Cov
0%
create
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 14.0
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4 # vim: set ts=3 sw=3 tw=0:
5 # vim: set expandtab:
6
7 package Rex::Endpoint::HTTP::Interface::Fs;
8
9 use strict;
10 use warnings;
11  
12 sub create {
13 my ($class, $type) = @_;
14  
15 if(! $type) {
16 if($^O =~ m/MSWin/) {
17 $type = "Windows";
18 }
19 else {
20 $type = "Posix";
21 }
22 }
23  
24 my $klass = "Rex::Endpoint::HTTP::Interface::Fs::$type";
25 eval "use $klass";
26  
27 if($@) {
28 die("Error loading Interface class ($klass).");
29 }
30  
31 return $klass->new;
32 }
33  
34 1;