Skip Menu |

This queue is for tickets about the Shell-Autobox CPAN distribution.

Report information
The Basics
Id: 38687
Status: resolved
Priority: 0/
Queue: Shell-Autobox

People
Owner: CHOCOLATE [...] cpan.org
Requestors: joerg [...] joergmeltzer.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.03



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.
Thanks, this should be fixed in 0.40.0. I'll take a look at IPC::Run3 as well. Thanks, chocolateboy. On Sat Aug 23 13:03:37 2008, JMELTZER wrote: Show quoted text
> 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
> > $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.