NAME

ProgressMonitor::Stringify::AbstractMonitor - A reusable/abstract monitor implementation that deals in stringified feedback.

DESCRIPTION

This is an abstract base class for monitors that will render their result as a string through the use of 'fields' (see the Fields packages).

PROTECTED METHODS

_new( $hashRef, $package )

Configuration data:

maxWidth (default => 79)

The monitor should have this maxWidth. The actual width used may be less. This depends on the fields it uses; specifically, if dynamic fields are used, they will be given width until all is used or until the dynamic fields themselves have reached their maxWidth if any.

If the maxWidth is too small to handle the minimum requirements for all fields the allowOverflow setting controls whether the rendition causes linewrapping or if it's just cut.

allowOverflow (default => 0)

If set to true and maxWidth is exceeded, linewrapping will occur for a possibly ugly display. If set to false, the rendition will be cut to avoid linewrapping, for a possible loss of important information.

fields (default => [])

An array ref with field instances.

messageStrategy (default => newline)

An identifiers that describes how messages should be inserted into the rendition:

none

Not surprisingly, this suppresses message presentation.

overlay

This will cause the message to overlay one or more of the other fields, so as to keep things on one line. This setting will work in conjunction with messageTimeout, messageOverlayStartField and messageOverlayEndField.

newline

This will cause the message and a newline to be inserted in front of the regular rendition, causing the running rendition to be 'pushed' forward.

overlay_newline

This will combine the effects of 'overlay' and 'newline'.

messageFiller (default => ' ')

If the message is too short for the allotted space, it will be filled with this character. Can be set to the empty string or undef to skip filling, causing a 'partial overlay', i.e. just as much as the string is, which obviously can give a confusing mixed message with the underlying field.

messageTimeout (default => 3 seconds)

This is only relevant for the 'overlay' strategy. If the code doesn't explicitly set the message to undef/blank, the timeout will automatically remove it. Set to -1 for infinite.

messageOverlayStartField, messageOverlayEndField (defaults => all fields)

Together these define the starting and ending field number that the message should overlay. This defaults to 'all fields'.

messageOverlayNewlineConversion (default => ' ')

Embedded/trailing newlines will be converted to this string for the 'overlay' and 'overlay_newline' strategies.

_toString

Contains the logic to assemble the fields into a current string.

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.