Perinci-Examples-Bin-Lite
view release on metacpan or search on metacpan
script/peri-eg-read-file-lite view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /Perinci/Examples/FileStream/read_file
# and generated automatically using Perinci::CmdLine::Gen version 0.496
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2020-04-29'; # DATE
our $DIST = 'Perinci-Examples-Bin-Lite'; # DIST
our $VERSION = '0.062'; # VERSION
use 5.010001;
use strict;
use warnings;
use Perinci::Examples;
use Perinci::CmdLine::Lite;
my $cmdline = Perinci::CmdLine::Lite->new(
url => "/Perinci/Examples/FileStream/read_file",
program_name => "peri-eg-read-file-lite",
);
$cmdline->run;
# ABSTRACT: peri-eg-read-file-lite
# PODNAME: peri-eg-read-file-lite
__END__
=pod
=encoding UTF-8
=head1 NAME
peri-eg-read-file-lite - peri-eg-read-file-lite
=head1 VERSION
This document describes version 0.062 of peri-eg-read-file-lite (from Perl distribution Perinci-Examples-Bin-Lite), released on 2020-04-29.
=head1 SYNOPSIS
Usage:
% peri-eg-read-file-lite [--config-path=path | -c]
[--config-profile=profile | -P] [--format=name] [--json]
[--(no)naked-res] [--no-config | -C] [--no-env]
[--page-result[=program]] <path>
=head1 DESCRIPTION
This function demonstrate output streaming of bytes.
To do output streaming, on the function side, you just return a coderef which
can be called by caller (e.g. CLI framework L<Perinci::CmdLine>) to read data
from. Code must return data or undef to signify exhaustion.
This works over remote (HTTP) too, because output streaming is supported by
L<Riap::HTTP> (version 1.2) and L<Perinci::Access::HTTP::Client>. Streams
are translated into HTTP chunks.
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--path>=I<s>*
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
=item B<--no-config>, B<-C>
Do not use any configuration file.
=back
=head2 Environment options
=over
=item B<--no-env>
Do not read environment for default options.
=back
=head2 Output options
=over
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
=item B<--json>
Set output format to json.
=item B<--naked-res>
( run in 2.050 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )