HTTP/Interface/Exec/Posix.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a 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 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
exec
2.0
BEGIN
2.0
CRAP 2.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::Exec::Posix;
8
9 use strict;
10 use warnings;
11  
12 use Rex::Endpoint::HTTP::Interface::Exec::Base;
13 use base qw(Rex::Endpoint::HTTP::Interface::Exec::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 exec {
26 my ($self, $cmd) = @_;
27  
28 my $out = qx{LC_ALL=C $cmd};
29  
30 return $out;
31 }
32 1;