Progress::Any::Output::TermMessage - Output progress to terminal as simple message
This document describes version 0.041 of Progress::Any::Output::TermMessage (from Perl distribution Progress-Any-Output-TermMessage), released on 2018-03-26.
use Progress::Any::Output; Progress::Any::Output->set('TermMessage', template=>"[%n] (%P/%T) %m");
This output displays progress indicators as messages on terminal.
Instantiate. Usually called through Progress::Any::Output->set("TermMessage", %args).
Progress::Any::Output->set("TermMessage", %args)
Known arguments:
fh => GLOB (default: \*STDERR)
Wheere to send progress message.
template => STR (default: '(%P/%T) %m')
Will be used to do $progress->fill_template(). See Progress::Any for supported template strings.
$progress->fill_template()
single_line_task => BOOL (default: 0)
If set to true, will reuse line using a series of \b to get back to the original position, as long as the previous update is for the same task and the finished attribute is false. For example:
\b
finished
use Progress::Any; use Progress::Any::Output; Progress::Any::Output->set("TermMessage", single_line_task=>0, template=>"%t %m"); my $progress = Progress::Any->get_indicator( task => 'copy', title => 'Copying file ... '); $progress->update(message=>'file1.txt'); $progress->update(message=>'file2.txt'); $progress->update(message=>'file3.txt'); $progress->finish(message=>'success');
will result in:
Copying file ... file1.txt_ Copying file ... file2.txt_ Copying file ... file3.txt_ Copying file ... success _
all in one line.
Bool. Forces disabling or enabling progress output (just for this output).
In the absence of PROGRESS_TERM_MESSAGE and PROGRESS, will default to 1 if filehandle is tested to be in interactive mode (using -t).
-t
Bool. Forces disabling or enabling progress output (for all outputs).
Please visit the project's homepage at https://metacpan.org/release/Progress-Any-Output-TermMessage.
Source repository is at https://github.com/perlancar/perl-Progress-Any-Output-TermMessage.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Progress-Any-Output-TermMessage
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Progress::Any
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018, 2013 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Progress::Any::Output::TermMessage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Progress::Any::Output::TermMessage
CPAN shell
perl -MCPAN -e shell install Progress::Any::Output::TermMessage
For more information on module installation, please visit the detailed CPAN module installation guide.