NAME
App::newver::INI - newver INI file parser
SYNOPSIS
use App::newver::INI qw(read_ini);
my $hash = read_ini($path_to_ini);
DESCRIPTION
App::newver::INI is an INI parser module for newver. This is a private module, for user documentation please consult the newver manual.
newver uses the following dialect of INI:
- Key-value pairs are seperated by equals (=) signs.
- Sections are lines enclosed in brackets.
- Key-value pairs must be under a section (no default section)
- Comments start with a hash (#) sign.
- Whitespace is trimmed.
- Leading and trailing whitespace is trimmed.
SUBROUTINES
Subroutines are not exported by default.
$hash = read_ini($ini_file)
Reads the INI file $ini_file and returns a hash of hashes representing the file.
For example, the following INI file:
[Cat]
Meows = Yes
Tail = Yes
[Dog]
Meows = No
Tail = Yes
would yield the following hash structure:
{
'Cat' => {
Meows => 'Yes',
Tail => 'Yes',
},
'Dog' => {
Meows => 'No',
Tail => 'Yes',
},
}
AUTHOR
Written by Samuel Young
This project's source can be found on its Codeberg page. Comments and pull requests are welcome.
COPYRIGHT
Copyright (C) 2025 Samuel Young.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
SEE ALSO
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 79:
You forgot a '=back' before '=head1'
- Around line 130:
=back without =over