There is an ongoing outage on the primary CPAN mirror. It is possible to work around the issue by using MetaCPAN as a mirror.

NAME

PerlIO::via::EscStatus - layer for carriage-return status display

SYNOPSIS

use PerlIO::via::EscStatus;
binmode (STDOUT, ':via(PerlIO::via::EscStatus)') or die;

PerlIO::via::EscStatus->set_status ('20% finished');
print "A message here.\n";
PerlIO::via::EscStatus->set_status ('30% finished');
print "Another message here.\n";

DESCRIPTION

EscStatus prints a status line on a dumb terminal using carriage return ("\r"). Each new status overwrites the old, and any current status is erased before letting normal output go through, so it's not obscured.

The status is not printed until a newline is reached in the normal output, so if the normal output is coming in dribs and drabs it's only when the line is finished that the status is shown.

FUNCTIONS

PerlIO::via::EscStatus->set_status ($str)

Set the status string to be displayed, with an empty string or undef for no status at all.

SEE ALSO

PerlIO::via