Perinci-Examples-Bin-Classic
view release on metacpan or search on metacpan
script/peri-eg-read-file 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.497
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-01-30'; # DATE
our $DIST = 'Perinci-Examples-Bin-Classic'; # DIST
our $VERSION = '0.081'; # VERSION
use 5.010001;
use strict;
use warnings;
use Perinci::CmdLine::Classic;
my $cmdline = Perinci::CmdLine::Classic->new(
url => "/Perinci/Examples/FileStream/read_file",
program_name => "peri-eg-read-file",
);
$cmdline->run;
# ABSTRACT: peri-eg-read-file
# PODNAME: peri-eg-read-file
__END__
=pod
=encoding UTF-8
=head1 NAME
peri-eg-read-file - peri-eg-read-file
=head1 VERSION
This document describes version 0.081 of peri-eg-read-file (from Perl distribution Perinci-Examples-Bin-Classic), released on 2021-01-30.
=head1 SYNOPSIS
Usage:
% peri-eg-read-file [--config-path=path+] [--config-profile=profile]
[--format-options=s] [--format=name] [--json] [--(no)naked-res]
[--no-config] [--no-env] <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>
Set path to configuration file.
Can be specified multiple times.
=item B<--config-profile>=I<s>
Set configuration profile to use.
=item B<--no-config>
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-options>=I<s>
Pass options to formatter.
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
( run in 1.017 second using v1.01-cache-2.11-cpan-140bd7fdf52 )