App-AcmeCpanauthors
view release on metacpan or search on metacpan
script/acme-cpanauthors view on Meta::CPAN
#
#__END__
#
#=pod
#
#=encoding UTF-8
#
#=head1 NAME
#
#Perinci::Result::Format::Lite - Format enveloped result
#
#=head1 VERSION
#
#This document describes version 0.287 of Perinci::Result::Format::Lite (from Perl distribution Perinci-Result-Format-Lite), released on 2022-09-12.
#
#=head1 SYNOPSIS
#
#=head1 DESCRIPTION
#
#This module formats L<enveloped result structure|Rinci::function/"Enveloped
#result"> to "pretty text" if it can do so, e.g. the structure can be represented
#as a 2-dimensional table. Otherwise, it falls back to JSON or Perl. The table
#formats supported include CSV, TSV, LTSV, or HTML. More table formats (e.g. Org,
#Markdown) are supported via L<Text::Table::Any> when you set
#L</"FORMAT_PRETTY_TABLE_BACKEND">.
#
#This module is a more lightweight version of L<Perinci::Result::Format> but the
#long-term goal is to reunite the two formatting modules back to a
#modular/pluggable module.
#
#=for Pod::Coverage ^(firstidx)$
#
#=head1 FUNCTIONS
#
#=head2 format($res, $format[ , $is_naked=0, $cleanse=1 ]) => str
#
#=head1 ENVIRONMENT
#
#=head2 FORMAT_PRETTY_TABLE_BACKEND
#
#Str, optional. If this is set, will render text table using L<Text::Table::Any>
#(with C<backend> set to the value of this environment variable) instead of the
#default L<Text::Table::Sprintf>. This is useful if you want to output text table
#in a different format, for example to generate Org tables (make sure
#L<Text::Table::Org> backend is already installed):
#
# % FORMAT_PRETTY_TABLE_BACKEND=Text::Table::Org lcpan rdeps Getopt::Lucid
#
#For convenience, a default is chosen for you under certain condition. When
#inside Emacs (environment C<INSIDE_EMACS> is set), C<Text::Table::Org> is used
#as default.
#
#=head2 FORMAT_PRETTY_TABLE_BACKEND_OPTS
#
#Str, JSON-encoding expected. This setting is to accompany
#L</FORMAT_PRETTY_TABLE_BACKEND>, to be passed to
#L<Text::Table::Any>C<::table()>'s C<backend_opts> argument. It should be a hash
#encoded in JSON, e.g.:
#
# # keep table aligned in the presence of wide Unicode characters
# % FORMAT_PRETTY_TABLE_BACKEND=Text::Table::More FORMAT_PRETTY_TABLE_BACKEND_OPTS='{"wide_char":1}' tabledata locale::JP::City::MIC --page
#
#=head2 FORMAT_PRETTY_TABLE_COLUMN_ORDERS => array (json)
#
#Set the default of C<table_column_orders> in C<format_options> in result
#metadata, similar to what's implemented in L<Perinci::Result::Format> and
#L<Data::Format::Pretty::Console>.
#
#=head2 COLOR => bool
#
#=head1 HOMEPAGE
#
#Please visit the project's homepage at L<https://metacpan.org/release/Perinci-Result-Format-Lite>.
#
#=head1 SOURCE
#
#Source repository is at L<https://github.com/perlancar/perl-Perinci-Result-Format-Lite>.
#
#=head1 SEE ALSO
#
#L<Perinci::Result::Format>, a more heavyweight version of this module.
#
#L<Perinci::CmdLine::Lite> uses this module to format enveloped result.
#
#=head1 AUTHOR
#
#perlancar <perlancar@cpan.org>
#
#=head1 CONTRIBUTING
#
#
#To contribute, you can send patches by email/via RT, or send pull requests on
#GitHub.
#
#Most of the time, you don't need to build the distribution yourself. You can
#simply modify the code, then test via:
#
# % prove -l
#
#If you want to build the distribution (e.g. to try to install it locally on your
#system), you can install L<Dist::Zilla>,
#L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
#L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
#Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
#that are considered a bug and can be reported to me.
#
#=head1 COPYRIGHT AND LICENSE
#
#This software is copyright (c) 2022, 2021, 2020, 2018, 2017, 2016, 2015 by perlancar <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.
#
#=head1 BUGS
#
#Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Result-Format-Lite>
#
#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.
#
( run in 2.497 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )