App-IODUtils

 view release on metacpan or  search on metacpan

script/insert-iod-key  view on Meta::CPAN

        $args{section}, $args{key}, $args{value},
    );

    App::IODUtils::_return_mod_result(\%args, $doc);
}

Perinci::CmdLine::Any->new(
    url => '/main/insert_iod_key',
    read_config => 0,
    read_env => 0,
)->run;

# ABSTRACT: Insert a key to IOD configuration file
# PODNAME: insert-iod-key

__END__

=pod

=encoding UTF-8

=head1 NAME

insert-iod-key - Insert a key to IOD configuration file

=head1 VERSION

This document describes version 0.164 of insert-iod-key (from Perl distribution App-IODUtils), released on 2024-06-24.

=head1 SYNOPSIS

Basic usage:

 % insert-iod-key /path/to/file.iod section key value

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--add>

When key already exists, add.

=item B<--create-section>

When section does not exist, create it first.

=item B<--ignore>

When key already exists, do nothing.

=item B<--inplace>

Modify file in-place.

Note that this can only be done if you specify an actual file and not STDIN.
Otherwise, an error will be thrown.


=item B<--key>=I<s>*

(No description)


Can also be specified as the 3rd command-line argument.

=item B<--linum>=I<s>

Put key line at a specific line number (line number starts from 1).

=item B<--replace>

When key already exists, delete previous key(s) first.

=item B<--section>=I<s>*

(No description)


Can also be specified as the 2nd command-line argument.

=item B<--top>

Add to the beginning of section instead of end.

=item B<--value>=I<s>*

(Raw) value.

Can also be specified as the 4th command-line argument.

=back

=head2 Output options

=over

=item B<--format>=I<s>

Choose output format, e.g. json, text.

Default value:

 undef

Output can be displayed in multiple formats, and a suitable default format is
chosen depending on the application and/or whether output destination is
interactive terminal (i.e. whether output is piped). This option specifically
chooses an output format.


=item B<--json>

Set output format to json.

=item B<--naked-res>



( run in 0.941 second using v1.01-cache-2.11-cpan-39bf76dae61 )