---
name: "Data::TableReader::Decoder::Mock"
section: "3pm"
platform: "linux"
package: "libdata-tablereader-perl"
version: "0.021-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Data::TableReader::Decoder::Mock"
---

# Data::TableReader::Decoder::Mock(3pm)

Decoder that returns supplied data without decoding anything

## NAME

Data::TableReader::Decoder::Mock - Decoder that returns supplied data without decoding anything

## VERSION

version 0.021

## SYNOPSIS

```
    decoder => {
      CLASS => 'Mock',
      datasets => [
        [ # Data Set 0
           [ 1, 2, 3, 4, 5 ],
           ...
        ],
        [ # Data Set 1
           [ 1, 2, 3, 4, 5 ],
           ...
        ],
      ]
    }
```

or

```
    decoder => {
      CLASS => 'Mock',
      table => [
         [ 1, 2, 3, 4, 5 ],
         ...
      ],
    }
```

This doesn't actually decode anything; it just returns verbatim rows of data from arrayrefs that you supply.  You can provide one or multiple tables.  The 'table' constructor parameter is an alias for `"datasets[0]"`.

## ATTRIBUTES

See attributes from parent class: Data::TableReader::Decoder.

### datasets

The verbatim data which will be returned by the iterator.  This can be an array of tables, or one table itself.  A table must be composed of arrayrefs, and the cells of the table cannot themselves be arrayrefs.

## AUTHOR

Michael Conrad \<mike@nrdvana.net\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Michael Conrad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
