Kenneth Ölwing > ProgressMonitor-0.29 > ProgressMonitor::Stringify::Field::Fixed

Download:
ProgressMonitor-0.29.tar.gz

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: ProgressMonitor-0.31

NAME ^

ProgressMonitor::Stringify::Field::Fixed - a field implementation that renders a fixed value.

SYNOPSIS ^

  # call someTask and give it a monitor to call us back
  #
  my $text = ProgressMonitor::Stringify::Fields::Fixed->new({text => 'Percent complete: '});
  my $pct = ProgressMonitor::Stringify::Fields::Percentage->new;
  someTask(ProgressMonitor::Stringify::ToStream->new({fields => [ $text, $pct ]});

DESCRIPTION ^

This is a fixed size field rendering a fixed value. Intended for use together with other fields in order to provide explanatory text or similar.

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

METHODS ^

new( $hashRef )

Configuration data:

text (default => ' ')

The text to display.

change_text( $newText, [$filler] )

Change the text to display and returns the old text.

The filler is optional, and defaults to ' ' (space), and will be used to pad the passed in text to the assigned width of the field if its shorter. If it's too long, it will be cut.

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.