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

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

VERSION

This document describes version 0.30 of Perinci::Object::EnvResultTable (from Perl distribution Perinci-Object), released on 2017-02-03.

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://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Object

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