gitpan / term-spinner-lite Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for Term-Spinner-Lite
Home Page: http://metacpan.org/release/Term-Spinner-Lite
License: Other
Read-only release history for Term-Spinner-Lite
Home Page: http://metacpan.org/release/Term-Spinner-Lite
License: Other
NAME Term::Spinner::Lite - A spinner without so much Moose in it VERSION version 0.03 SYNOPSIS use utf8; use 5.010; use Term::Spinner::Lite; my $s = Term::Spinner::Lite->new( delay => 100_000, spin_chars => ['◑', '◒', '◐', '◓'], ); $s->next() for 1 .. 100_000; $s->done(); This is a simple spinner, useful when you want to show some kind of activity during a long-running activity of non-determinant length. It's loosely based on the API from Term::Spinner. Unlike Term::Spinner though, this module doesn't have any dependencies outside of modules shipped with Perl itself. ATTRIBUTES output_handle Gets or sets the handle where output will be written. By default, uses STDERR. You may pass an optional PerlIO encoding specification. By default it will use ":utf8" in case you want to use UTF8 characters in your spinner. spin_chars Gets or sets the list of characters to cycle through. By default it uses the sequence "-" "\" "|" "/". This attribute must be set using an array ref, e.g., [ qw( . o O o ) ] This attribute will croak by an attempt to set itself using anything else. delay Gets or sets the delay between state changes in microseconds. (A good value for smooth spinning is 100000.) Defaults to 0. METHODS new() The object constructor. You may optionally set object attributes "spin_chars" or "output_handle" in the parameter list. count() Return the number of advances through the spin sequence. next() Advance the spinner state to the next character in the spin sequence and output it to "output_handle". done() Finish spinning, and clear the last character printed. If a true value is passed, output a newline. AUTHOR Mark Allen <[email protected]> COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Mark Allen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.