App-INIUtils
view release on metacpan or search on metacpan
script/get-ini-key view on Meta::CPAN
sub get_ini_key {
my %args = @_;
my $reader = App::INIUtils::_get_ciir_reader(\%args);
my $hoh = $reader->read_string($args{ini});
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_ini_key',
read_config => 0,
read_env => 0,
)->run;
script/get-ini-section view on Meta::CPAN
};
sub get_ini_section {
my %args = @_;
my $reader = App::INIUtils::_get_ciir_reader(\%args);
my $hoh = $reader->read_string($args{ini});
my $section = $args{section};
return [404, "No such section"] unless exists $hoh->{$section};
[200, "OK", $hoh->{$section}];
}
Perinci::CmdLine::Any->new(
url => '/main/get_ini_section',
read_config => 0,
read_env => 0,
)->run;
# ABSTRACT: Get whole section of INI configuration file
( run in 1.014 second using v1.01-cache-2.11-cpan-39bf76dae61 )