Term::...:Quiet(3pm)

πŸ“¦
version 0.31 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Term::ProgressBar::Quiet(3pm) πŸ’–

okay bestie, welcome to your new fave lil page from the User Contributed Perl Documentation section of the manual. it's called Term::ProgressBar::Quiet and honestly? it's giving "quiet luxury" but for your terminal. πŸŽ€


✨ NAME ✨

Term::ProgressBar::Quiet β€” the way it provides a progress meter if run interactively. periodt. that's the whole personality. πŸ‘‘


🌸 SYNOPSIS 🌸

here's the whole vibe, copy-paste ready, no cap:

use Term::ProgressBar::Quiet;
my @todo     = ( 'x' x 10 );
my $progress = Term::ProgressBar::Quiet->new(
    { name => 'Todo', count => scalar(@todo), ETA => 'linear' } );

my $i = 0;
foreach my $todo (@todo) {

    # do something with $todo
    $progress->update( ++$i );
}
$progress->message('All done');

like… look at her. new with a hashref, name, count, ETA => 'linear', then you just update( ++$i ) as you grind through your list, and finish with a lil message('All done'). iconic behavior fr fr. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so Term::ProgressBar is literally a wonderful module for showing progress bars on the terminal β€” nobody's arguing with that, she ate. πŸ“

and Term::ProgressBar::Quiet acts very much like that module when it is run interactively. same energy, same moves.

but β€” and this is the main character plot twist β€” when it is not run interactively (think: as a cron job, bestie, where nobody's watching the terminal) then it does not show the progress bar. silence. stealth mode. 🀫✨

so if you've ever had a cron job spam your inbox with a million progress-bar redraws, this module is your emotional support bestie. it knows when to be quiet. iykyk. πŸ’œ

🫢 AUTHOR 🫢

Leon Brocard, acme@astray.com β€” thank you for your service, king. πŸ‘‘


Copyright (c) 2007 Leon Brocard. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(translation: it's free, it's Perl-licensed, go wild, just keep the terms. slay. πŸ’–)


and that's the whole page, bestie!! 🌟 this was perl v5.34.0, dated 2022-06-17, from the Term::...:Quiet(3pm) corner of the manual β€” mwah, go make some quiet progress bars, you got this πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from