Term::YAP - show pulsed progress bar in terminal
use Term::YAP; my $yap = Term::YAP->new( { name => 'Checking', rotate => 0, time => 1 } ); $yap->start(); # start the pulse # do something between $yap->stop() # stop it
Term::YAP is a Moo based class to implement a "pulse" bar in a terminal. A pulse bar doesn't actually keep track of progress from any task being executed but at least shows that the program is working in something instead of showing nothing for the end user.
This is the parent class and some methods were not implemented, you probably want to look for subclasses to get an implementation.
This module started as a shamelessly copy from Term::Pulse, nowadays it keeps the same features but with a different implementation.
Nothing.
All attributes are optional and have their respective default values.
A simple message displayed before the pulse. The default value is 'Working'.
Boolean. Rotates the pulse if set to true. It is false by default.
Boolean. Display the elapsed time if set to 1. Turn off by default.
Set the pulse size. The default value is 16.
The time (Unix Epoch) that the pulse bar started in seconds.
This attribute is "private".
The microseconds elapsed that each pulse has between each other. The default value is 200000.
Boolean. If true, the pulse was started, false otherwise.
*STDOUT{IO}
Boolean. If true, additional messages (which will mangle output) will by printed to STDOUT.
STDOUT
Defaults to false.
Getter for running attribute.
running
Install handlers for signals INT and __DIE__.
INT
__DIE__
Returns the value of the name attribute.
Returns the value of rotatable attribute.
Returns the value of time attribute.
Returns the value of size attribute.
Starts the pulse. Returns the value of running attribute.
Returns the value set of debug attribute.
debug
Setter for the debug attribute.
Stop the pulse and return elapsed time.
Term::Pulse
Moo
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
Term::Pulse was originally created by Yen-Liang Chen, <alec at cpan.com>
This software is copyright (c) 2015 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
This file is part of Term-YAP distribution.
Term-YAP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Term-YAP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Term-YAP. If not, see <http://www.gnu.org/licenses/>.
To install Term::YAP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::YAP
CPAN shell
perl -MCPAN -e shell install Term::YAP
For more information on module installation, please visit the detailed CPAN module installation guide.