NAME

ProgressMonitor::Stringify::Fields::AbstractField - A reusable/abstract field implementation for stringify progress.

SYNOPSIS

  ...
  use classes
    extends  => 'ProgressMonitor::Stringify::Fields::AbstractField',
    new      => 'new',
    ...
  ;

  sub new
  {
    my $class = shift;
    my $cfg   = shift;

    my $self = $class->SUPER::_new($cfg, $CLASS);

    ...
  }

  sub render
  {
    my $self = shift;
	
    ...
  }

DESCRIPTION

This class is a base class for fields for stringified feedback.

When extended it provides some accessors for 'protected' data, i.e. only for the use of subclasses. These accessors are prefixed with '_'.

Subclassing this normally entails only defining the render method.

METHODS

render( $ticks, $totalTicks )

Called with the current tick count, and the total tick count. Should return with an appropriate string corresponding to the tick vs totalTick values.

This implementation is abstract, must be reimplemented.

isDynamic

Should return true if the field is dynamic. Automatically handled by inheriting from the AbstractDynamicField.

PROTECTED METHODS

_new( $hashRef, $package )

The constructor, needs to be called by subclasses.

Configuration data: (none)

_get_cfg

Returns the configuration object.

_set_width

Set the width of the field.

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.