The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Spreadsheet::Engine::Value - A value/type combination

SYNOPSIS

  my $op = Spreadsheet::Engine::Value->new(
    type => 'n',
    value => 10,
  );

  my $type = $op->type;
  my $value = $op->value;

  if ($op->is_txt) { ... }
  if ($op->is_num) { ... }
  if ($op->is_number) { ... }
  if ($op->is_blank) { ... }
  if ($op->is_logical) { ... }
  if ($op->is_error) { ... }
  if ($op->is_na) { ... }

DESCRIPTION

In a spreadsheet, values also have an accompanying type. This class represents such a value/type combination.

CONSTRUCTOR

new

Instantiate with a type and value.

INSTANCE VARIABLES

type / value

The value and type.

METHODS

is_txt

Does this have a textual type (of any subtype)?

is_num

Does this have a numberic type (of any subtype)?

is_number

Is this a number (type 'n', no subtype)?

is_blank

Is this blank?

is_logical

Is this a logical value (true/false)?

is_error

Is this an error?

is_na

Is this N/A?

HISTORY

This code was created for Spreadsheet::Engine 0.11

COPYRIGHT

Copyright (c) 2007, 2008 Tony Bowden

LICENCE

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