ProgressMonitor::Stringify::Fields::AbstractField - A reusable/abstract field


ProgressMonitor documentation  | view source Contained in the ProgressMonitor distribution.

Index


NAME

Top

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

SYNOPSIS

Top

  ...
  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

Top

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

Top

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

Top

_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

Top

Kenneth Olwing, <knth at cpan.org>

BUGS

Top

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

Top

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

    perldoc ProgressMonitor

ACKNOWLEDGEMENTS

Top

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

COPYRIGHT & LICENSE

Top


ProgressMonitor documentation  | view source Contained in the ProgressMonitor distribution.