Skip Menu |

This queue is for tickets about the Term-ProgressBar-Quiet CPAN distribution.

Report information
The Basics
Id: 57972
Status: new
Priority: 0/
Queue: Term-ProgressBar-Quiet

People
Owner: Nobody in particular
Requestors: PSILVA [...] cpan.org
Cc: pedros [...] berkeley.edu
AdminCc:

Bug Information
Severity: Important
Broken in: 0.31
Fixed in: (no value)



CC: pedros [...] berkeley.edu
Subject: is_interactive() call should honor Term::ProgressBar's 'fh' field
If Term::ProgressBar's configuration hash includes the 'fh' (filehandle) field, the respective value should be passed on to IO::Interactive::is_interactive(), otherwise Term::ProgressBar::Quiet is broken on STDOUT redirection. Small patch attached.
Subject: Quiet.pm.0.31.patch
*** Quiet.pm 2010-05-29 23:26:17.000000000 -0700 --- Quiet.pm.new 2010-05-29 23:28:25.000000000 -0700 *************** *** 8,14 **** sub new { my $class = shift; ! if ( is_interactive ) { return Term::ProgressBar->new(@_); } else { my $mock = Test::MockObject->new(); --- 8,14 ---- sub new { my $class = shift; ! if ( is_interactive( $_[0]->{fh} if $_[0]->{fh} ) ) { return Term::ProgressBar->new(@_); } else { my $mock = Test::MockObject->new();