<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Term-Sk Version 0.07

This is a Perl extension for displaying a progress indicator on a terminal.

SYNOPSIS

  use Term::Sk;

  my $ctr = Term::Sk-&gt;new('%d Elapsed: %8t %21b %4p %2d (%8c of %11m)',
    {quiet =&gt; 0, freq =&gt; 10, base =&gt; 0, target =&gt; 100, pdisp =&gt; '!'})
    or die "Error 0010: Term::Sk-&gt;new, ".
           "(code $Term::Sk::errcode) ".
           "$Term::Sk::errmsg";

  $ctr-&gt;up for (1..100);

  $ctr-&gt;down for (1..100);

  $ctr-&gt;whisper('abc'); 

  my last_line = $ctr-&gt;get_line;

  $ctr-&gt;close;

  print "Number of ticks: ", $ctr-&gt;ticks, "\n";

EXAMPLES

Term::Sk is a class to implement a progress indicator ("Sk" is a short form for "Show Key"). This is used to provide immediate feedback for
long running processes.

A sample code fragment that uses Term::Sk:

  use Term::Sk;

  print qq{This is a test of "Term::Sk"\n\n};

  my $target = 2_845;
  my $format = '%2d Elapsed: %8t %21b %4p %2d (%8c of %11m)';

  my $ctr = Term::Sk-&gt;new($format,
    {freq =&gt; 10, base =&gt; 0, target =&gt; $target, pdisp =&gt; '!'})
    or die "Error 0010: Term::Sk-&gt;new, ".
           "(code $Term::Sk::errcode) ".
           "$Term::Sk::errmsg";

  for (1..$target) {
      $ctr-&gt;up;
      do_something();
  }

  $ctr-&gt;close;

  sub do_something {
      my $test = 0;
      for my $i (0..10_000) {
          $test += sin($i) * cos($i);
      }
  }

INSTALLATION

To install this module, run the following commands:

	perl Build.PL
	perl Build
	perl Build test
	perl Build install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Term::Sk

You can also look for information at:

    RT, CPAN's request tracker
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Term-Sk

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Term-Sk

    CPAN Ratings
        http://cpanratings.perl.org/d/Term-Sk

    Search CPAN
        http://search.cpan.org/dist/Term-Sk/


COPYRIGHT AND LICENCE

Copyright (C) 2008 Klaus Eichner

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
</pre></body></html>