Spreadsheet::Engine::Fn::counter - base class for counting functions


Spreadsheet-Engine documentation  | view source Contained in the Spreadsheet-Engine distribution.

Index


NAME

Top

Spreadsheet::Engine::Fn::counter - base class for counting functions

SYNOPSIS

Top

  use base 'Spreadsheet::Engine::Fn::counter';

  sub calculate { 
    return sub { 
      my $type = shift;
      return is_match($type)
    };
  }

DESCRIPTION

Top

This provides a base class for spreadsheet functions that count the number of values in a list that match a certain type (COUNT, COUNTA, COUNTBLANK, etc).

METHODS

Top

argument_count

By default all such functions take one or more argument.

result_type

This is always a number.

TO SUBCLASS

Top

calculate

Returns a subref that is given each type in turn and returns a true/false value for whether or not it should be counted in the total.

HISTORY

Top

This is a Modified Version of code extracted from SocialCalc::Functions in SocialCalc 1.1.0

COPYRIGHT

Top

LICENCE

Top

The contents of this file are subject to the Artistic License 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.perlfoundation.org/artistic_license_2_0


Spreadsheet-Engine documentation  | view source Contained in the Spreadsheet-Engine distribution.