package Perinci::Object::EnvResultTable;

our $DATE = '2021-01-02'; # DATE
our $VERSION = '0.311'; # VERSION

use 5.010;
use strict;
use warnings;

use parent qw(Perinci::Object::EnvResult);

sub add_field {
    my ($self, $name, %attrs) = @_;
    ${$self}->[3]{'table.fields'} //= [];
    push @{ ${$self}->[3]{'table.fields'} }, $name;

# ABSTRACT: Represent enveloped result (table)



=encoding UTF-8

=head1 NAME

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

=head1 VERSION

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


 use Perinci::Object::EnvResultTable;

 sub myfunc {

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

     # add fields

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


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

=head1 METHODS

=head2 new($res) => OBJECT

Create a new object from C<$res> enveloped result array.

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

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


Please visit the project's homepage at L<>.

=head1 SOURCE

Source repository is at L<>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<>

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

=head1 SEE ALSO



=head1 AUTHOR

perlancar <>


This software is copyright (c) 2021, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by

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