| 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; |