in reply to Porting tqdm to Perl

G'day perlancar,

I'm not particularly familiar with Python, and have never heard of tqdm(), so this is just a suggestion.

The Smart::Comments CPAN module achieves something similar to what I think you're looking for. Its "Progress Bars" section has substantial documentation; also see the "Time-Remaining Estimates" section.

It also documents a number of caveats which may be pertinent depending on your intended usage. For instance, it uses source filters and has some efficiency issues when the number of iterations is indeterminate.

— Ken

Replies are listed 'Best First'.
Re^2: Porting tqdm to Perl
by perlancar (Hermit) on Dec 24, 2018 at 00:08 UTC

    Adding progress bar using Smart::Comments is cute, and has its pro's too, but is not a solution I prefer in real-world practice. Actually you don't need to know much Python to understand the library, but it helps to know that Python uses iterable a lot and that is advantage for tqdm.