NAME

ProgressMonitor::Stringify::Field::Counter - a field implementation that renders progress as a counter.

SYNOPSIS

# call someTask and give it a monitor to call us back
#
my $counter = ProgressMonitor::Stringify::Fields::Counter->new;
someTask(ProgressMonitor::Stringify::ToStream->new({fields => [ $counter ]});

DESCRIPTION

This is a fixed size field representing progress as a counter with or without the total displayed alongside, e.g. '00512/03000' meaning 512 ticks completed out of 3000.

Inherits from ProgressMonitor::Stringify::Fields::AbstractField.

METHODS

new( $hashRef )

Configuration data:

digits (default => 5)

The number of digits it should use. With the default it can thus indicate up to '99999'. Values above that will be printed using the overflow character.

delimiter (default => '/')

The delimiter string between the current and total values.

idleDelimiterSequence (default => ['\\', '/'])

When progress is made but with tick count not advancing, this sequence is used to show that something is happening. It should be a list of strings with each string having the same length as the delimiter. As idle work is done, the sequence will be stepped through, but immediately revert to the regular delimiter as soon as a tick is detected.

overflowCharacter (default => '#')

The character to be used when the value is to large to fit using the given amount of digits.

unknownCharacter (default => '?')

The character to use when the total is unknown.

showTotal (default => 1)

Turns on or off the total display. With no total displayed, no delimiter displayed and hence, no idleness shown either.

AUTHOR

Kenneth Olwing, <knth at cpan.org>

BUGS

I wouldn't be surprised! If you can come up with a minimal test that shows the problem I might be able to take a look. Even better, send me a patch.

Please report any bugs or feature requests to bug-progressmonitor at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ProgressMonitor. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find general documentation for this module with the perldoc command:

perldoc ProgressMonitor

ACKNOWLEDGEMENTS

Thanks to my family. I'm deeply grateful for you!

COPYRIGHT & LICENSE

Copyright 2006,2007 Kenneth Olwing, all rights reserved.

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