Perinci::Object::EnvResultTable - Represent enveloped result (table)
Contents
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.
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.
perl v5.36.0 2022-10-13 Perinci::Object::EnvResultTable(3pm)
Description
This class is a subclass of Perinci::Object::EnvResult and provides convenience methods when you want to
return table data.
Homepage
Please visit the project's homepage at <https://metacpan.org/release/Perinci-Object>.
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.
Name
Perinci::Object::EnvResultTable - Represent enveloped result (table)
See Also
Perinci::Object
Perinci::Object::EnvResult
Source
Source repository is at <https://github.com/perlancar/perl-Perinci-Object>.
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;
}
Version
This document describes version 0.311 of Perinci::Object::EnvResultTable (from Perl distribution Perinci-
Object), released on 2020-01-02.
