Skip Menu |

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

Report information
The Basics
Id: 118942
Status: resolved
Priority: 0/
Queue: Term-ProgressBar

People
Owner: MANWAR [...] cpan.org
Requestors: GFIREBALL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.17
Fixed in: 2.20



Subject: silent mode results in uninitialized value warnings
Using the option silent during construction of the Term::ProgressBar object, results in undef values as return of update method. Therefore, all example code in the documentation reports use of uninitialized value warnings. According to the documentation: "Instead, tell the constructor you want it to be silent and you don't need to change the rest of your program" is not possible without modification. I am using if (defined $next_value && $_ >= $next_value) to avoid the warnings, but the behavior should be changed, that updates returns the next value independently of silent or non-silent mode. Best, Frank
I created a test to reproduce the warnings and built a fix which is part of my pull request: https://github.com/szabgab/Term-ProgressBar/pull/9
Hi @GFIREBALL, Thanks for the PR. I have now merged your PR and released the changes Term::ProgressBar v2.20. Best Regards, Mohammad S Anwar