Group
Extension

Matches 2

CLI-Simple ( B/BI/BIGFOOT/CLI-Simple-1.0.7.tar.gz, BIGFOOT, 2025; MetaCPAN )
CLI-Simple/lib/CLI/Simple.pm ( view source; MetaCPAN )
I::Simple->new(
   option_specs    => [ qw( help format=s ) ],
   default_options => { format => 'json' }, # set some defaults
   extra_options   => [ qw( content ) ], # non-option, setter/getter
   c
I::Simple->new(
    option_specs    => [qw( help format=s )],
    default_options => { format => 'json' },  # set some defaults
    extra_options   => [qw( content )],       # non-option, setter/gette
ith a clear error.

=back

=head2 Usage examples

  # Using an option alias
  script.pl --cfg app.json execute

  # Using a command alias
  script.pl ls

After parsing, both C<get_config()> and C<get_
CLI-Simple ( B/BI/BIGFOOT/CLI-Simple-1.0.7.tar.gz, BIGFOOT, 2025; MetaCPAN )
CLI-Simple/lib/CLI/Simple/Utils.pm ( view source; MetaCPAN )
er;
use English qw(-no_match_vars);
use JSON qw(decode_json);
use List::Util qw(none);

use parent qw(Exporter);

our @EXPORT_OK = qw( slurp slurp_json dump_json normalize_options dmp);

our $VERSION 
p_json {
########################################################################
  my ($file) = @_;

  my $json = eval { return decode_json( slurp($file) ) };

  croak "ERROR: could not decode JSON s
tring:\n$EVAL_ERROR\n"
    if !$json || $EVAL_ERROR;

  return $json;
}

########################################################################
sub slurp {
##########################################

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.