use strict;
use utf8;
use warnings;
no warnings 'redefine';

use Umlaut qw(textmodus);

my $tty;

sub show_progress(@) {
    unless ( defined $tty ) {
        if ( open $tty, '>', '/dev/tty' ) {
            textmodus($tty);
            $tty->autoflush(1);
        }
        else { $tty = '' }
    }
    print $tty @_ if $tty;
}

1;
