Gentoo::Overlay::Group::INI - Load a list of overlays defined in a configuration file.
version 0.2.2
Generates a Gentoo::Overlay::Group object using a configuration file from your environment.
Gentoo::Overlay::Group
require Gentoo::Overlay::Group::INI; my $group = Gentoo::Overlay::Group::INI->load();
Currently, the following paths are checked:
~/.config/Perl/Gentoo-Overlay-Group-INI/config.ini # 'my_dist_config' dir ~/.config/Perl/Gentoo-Overlay-Group-INI/Gentoo-Overlay-Group-INI.ini ~/.local/share/Perl/dist/Gentoo-Overlay-Group-INI/config.ini # 'my_dist_data' dir ~/.local/share/Perl/dist/Gentoo-Overlay-Group-INI/Gentoo-Overlay-Group-INI.ini /etc/Gentoo-Overlay-Group-INI/config.ini /etc/Gentoo-Overlay-Group-INI/Gentoo-Overlay-Group-INI.ini
If you have set GENTOO_OVERLAY_GROUP_INI_PATH, it will be split by : and each part scanned:
GENTOO_OVERLAY_GROUP_INI_PATH
:
$ENV{GENTOO_OVERLAY_GROUP_INI_PATH} = "/a:/b" /a/config.ini /a/Gentoo-Overlay-Group-INI.ini /b/config.ini /b/Gentoo-Overlay-Group-INI.ini
If any of the path parts start with ~/ , those parts will be expanded to your "Home" directory.
~/
Format of the INI files is as follows:
[Overlays] directory = /usr/portage directory = /usr/local/portage
Returns a working Overlay::Group object.
my $group = Gentoo::Overlay::Group::INI->load();
Return an inflated arbitrary section:
# A "self-named" overlay section my $section = Gentoo::Overlay::Group::INI->load_named('Overlay'); # A 'custom named overlay section, ie: # [ Overlay / foo ] my $section = Gentoo::Overlay::Group::INI->load_named('foo');
Return all sections in a config file that do the given role.
do
my ( @sections ) = Gentoo::Overlay::Group::INI->load_all_does('Some::Role');
Return all sections in a config file that inherit the given class.
my ( @sections ) = Gentoo::Overlay::Group::INI->load_all_isa('Gentoo::Overlay::Group::Section::Overlay');
An array ref of Path::Tiny objects to scan for config files.
Fetch $CFG_PATHS, and initialize $CFG_PATHS if it isn't initialized.
$CFG_PATHS
my $path_list = _cf_paths();
Return the hard-coded array ref of paths to use, or parses $ENV{GENTOO_OVERLAY_GROUP_INI_PATH}.
$ENV{GENTOO_OVERLAY_GROUP_INI_PATH}
my $path_list = _init_cf_paths();
Returns a list of file paths to check, in the order they should be checked.
my @list = _enumerate_file_list();
Returns the path to the first file that exists.
my $first = _first_config_file();
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2013 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Gentoo::Overlay::Group::INI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gentoo::Overlay::Group::INI
CPAN shell
perl -MCPAN -e shell install Gentoo::Overlay::Group::INI
For more information on module installation, please visit the detailed CPAN module installation guide.