Perinci-Examples-Bin-Lite
view release on metacpan or search on metacpan
script/peri-eg-write-file-lite view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /Perinci/Examples/FileStream/write_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/write_file",
program_name => "peri-eg-write-file-lite",
);
$cmdline->run;
# ABSTRACT: peri-eg-write-file-lite
# PODNAME: peri-eg-write-file-lite
__END__
=pod
=encoding UTF-8
=head1 NAME
peri-eg-write-file-lite - peri-eg-write-file-lite
=head1 VERSION
This document describes version 0.062 of peri-eg-write-file-lite (from Perl distribution Perinci-Examples-Bin-Lite), released on 2020-04-29.
=head1 SYNOPSIS
Usage:
% peri-eg-write-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> <content>
=head1 DESCRIPTION
This function demonstrates input streaming of bytes.
To do input streaming, on the function side, you just specify one your args with
the C<stream> property set to true (C<< stream =E<gt> 1 >>). In this example, the
C<content> argument is set to streaming.
If you run the function through L<Perinci::CmdLine>, you'll get a coderef
instead of the actual value. You can then repeatedly call the code to read data.
This currently works for local functions only. As of this writing,
L<Riap::HTTP> protocol does not support input streaming. It supports partial
input though (see the documentation on how this works) and theoretically
streaming can be emulated by client library using partial input. However, client
like L<Perinci::Access::HTTP::Client> does not yet support this.
Note that the argument's schema is still C<buf*>, not C<code*>.
Note: This function overwrites existing file.
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--content-base64>=I<s>
See C<--content>.
=item B<--content>=I<s>*
=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.
( run in 0.562 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )