HTTP/Interface/Fs/Posix.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 36 CC 2 SCAR 11.5
CC
2
Cov
0%
rename
6.0
new
2.0
BEGIN
2.0
CRAP 3.1
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::Posix;
8
9 use strict;
10 use warnings;
11  
12 use Rex::Endpoint::HTTP::Interface::Fs::Base;
13 use base qw(Rex::Endpoint::HTTP::Interface::Fs::Base);
14  
15 sub new {
16 my $that = shift;
17 my $proto = ref($that) || $that;
18 my $self = $proto->SUPER::new(@_);
19  
20 bless($self, $proto);
21  
22 return $self;
23 }
24  
25 sub rename {
26 my ($self, $old, $new) = @_;
27  
28 system("/bin/mv $old $new >/dev/null 2>&1");
29  
30 if($? == 0) { return 1; }
31 }
32  
33 1;