NAME

Perinci::Object::EnvResultTable - Represent enveloped result (table)

VERSION

This document describes version 0.311 of Perinci::Object::EnvResultTable (from Perl distribution Perinci-Object), released on 2020-01-02.

SYNOPSIS

use Perinci::Object::EnvResultTable;

sub myfunc {
    ...

    my $envres = Perinci::Object::EnvResultTable->new;

    # add fields
    $envres->add_field('foo');
    $envres->add_field('foo');

    # finally, return the result
    return $envres->as_struct;
}

DESCRIPTION

This class is a subclass of Perinci::Object::EnvResult and provides convenience methods when you want to return table data.

METHODS

new($res) => OBJECT

Create a new object from $res enveloped result array.

$envres->add_field($name, %attrs)

Add a table field. This will create/push an entry to the table.fields result metadata array.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Perinci-Object.

SOURCE

Source repository is at https://github.com/perlancar/perl-Perinci-Object.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/perlancar/perl-Perinci-Object/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Perinci::Object

Perinci::Object::EnvResult

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar@cpan.org.

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