Text::TwiddlerText::Twiddler is a Perl module that offers a twiddle text for any type of output. | |
Download |
Text::Twiddler Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Daniel Muey
- Publisher web site:
- http://search.cpan.org/~dmuey/
Text::Twiddler Tags
Text::Twiddler Description
Text::Twiddler is a Perl module that offers a twiddle text for any type of output. Text::Twiddler is a Perl module that offers a twiddle text for any type of output.SYNOPSIS use Text::Twiddler; my $twiddler = Text::Twiddler->new(%options); # print animated text while we do a long operation so the # user knows we're still running without the messy details print $twiddler->get_start_twiddler() if !$verbose; my($wtr, $rdr); my $pid = open3($wtr, $rdr, $rdr, @long_command); while( ) { if ( $verbose ) { print $_; } else { print $twiddler->get_next_twiddler(); } } print $twiddler->get_start_twiddler() if !$verbose;Show a 'twiddled' (IE animated) message, perhaps during a long running operation or for a neat effect.What is nice is that, in the example in the synopsis, the animation is approximated to the actual state of the process.In other words, if the command is blazing through its task (Eg many lines of output very rapidly), then the 'animation' is very quick.If the command is working hard at one point and lags between outputting lines, then the animation also slows.In this way the twiddler, hides all the details of the output while still giving some idea of how its coming along. Requirements: · Perl
Text::Twiddler Related Software