Shell::Autobox doesn't properly handle STDIN as it doesn't pipe the
input into the $program. I recommend to use "<$stdin" when we have $input.
Patch is attached.
--- lib/Shell/Autobox.pm 2005-05-12 05:05:45.000000000 +0200
+++ /tmp/lib/Shell/Autobox.pm 2008-08-23 18:41:02.843750000 +0200
@@ -20,7 +20,15 @@
my $stdin = File::Temp->new();
my $stdout = File::Temp->new();
my $stderr = File::Temp->new();
- my $command = "$program $args $stdin 2> $stderr
Show quoted text
> $stdout";
+
+ my $command =
+ sprintf "%s %s %s 2>%s >%s",
+ $program,
+ $args,
+ defined $input? "<$stdin":"",
+ $stderr,
+ $stdout;
+
my ($output, $error, $status);
print $stdin $input;
For a major rework I recommend an implementation using IPC::Run3 over
one using insecure tempfiles.