On Sun Mar 06 06:18:32 2005, fluffy@sixears.co.uk wrote:
Show quoted text> Hi Andrew,
>
> I apologize for the slow reply.
>
> Can you tell me what $Config{OS} shows under Cygwin? Then I can
> integrate an
> OS-specific patch. I don't run Windoze myself, so cannot test
> unfortunately:
> if send you a patched .pm, would you be in a position to test?
>
> Mx.
>
> On Wed, Nov 10, 2004 at 08:19:06AM -0500, Guest via RT wrote:
> >
> > This message about Term-ProgressBar was sent to you by guest <> via
> > rt.cpan.org
> >
> > Full context and any attached attachments can be found at:
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=8344 >
> >
> > Hi Martyn
> >
> > Just a quick note to say that I had to reduce the width returned from
> > Term::ReadKey by 1 in the code to get this to run under Cygwin,
> > otherwise the "\r" on the end was lost and I got a screen full of
> > "progress" instead of one line.
> >
> > Thanks
> >
> > Andrew
This is a continuation of a bug originally filed 10 years ago by a guest who never responded:
https://rt.cpan.org/Public/Bug/Display.html?id=8344
Under windows/cygwin, the \r character is treated as an empty character, which causes Term::ProgressBar to keep over-flowing onto the next line.
Adding the following line during the calculation of $config{bar_width} in ProgressBar.pm results in the desired behaviour:
$^O eq 'cygwin' and $config{bar_width} -= 1;
Alternatively, it might be useful to allow the user to be able to configure left- and right-side margins.
In case it helps:
perl -v
Show quoted text> This is perl 5, version 14, subversion 4 (v5.14.4) built for cygwin-thread-multi
Module id = Term::ProgressBar
CPAN_USERID SZABGAB (Gabor Szabo <gabor@pti.co.il>)
CPAN_VERSION 2.15
CPAN_FILE S/SZ/SZABGAB/Term-ProgressBar-2.15.tar.gz
UPLOAD_DATE 2014-04-13
MANPAGE Term::ProgressBar - provide a progress meter on a standard terminal
INST_FILE /usr/lib/perl5/site_perl/5.14/Term/ProgressBar.pm
INST_VERSION 2.15