App-IODUtils

 view release on metacpan or  search on metacpan

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

sub get_iod_key {
    my %args = @_;

    my $reader = App::IODUtils::_get_reader(\%args);

    my $hoh = $reader->read_string($args{iod});

    my $section = $args{section};
    my $key     = $args{key};

    return [404, "No such section"] unless exists $hoh->{$section};
    return [404, "No such key"] unless exists $hoh->{$section}{$key};

    [200, "OK", $hoh->{$section}{$key}];
}

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

script/get-iod-section  view on Meta::CPAN

};
sub get_iod_section {
    my %args = @_;

    my $reader = App::IODUtils::_get_reader(\%args);

    my $hoh = $reader->read_string($args{iod});

    my $section = $args{section};

    return [404, "No such section"] unless exists $hoh->{$section};
    [200, "OK", $hoh->{$section}];
}

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

# ABSTRACT: Get whole section of IOD configuration file



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