-
-
13 Mar 2013 08:36:02 UTC
- Distribution: Gentoo-Overlay-Group-INI
- Module version: v0.2.2
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (332 / 6 / 4)
- Kwalitee
Bus factor: 0- 85.71% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (18.99KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
Why not adopt me?
This distribution is up for adoption! If you're interested then please contact the PAUSE module admins via email.- NAME
- VERSION
- SYNOPSIS
- CLASS METHODS
- PACKAGE VARIABLES
- PRIVATE FUNCTIONS
- PRIVATE METHODS
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Gentoo::Overlay::Group::INI - Load a list of overlays defined in a configuration file.
VERSION
version 0.2.2
SYNOPSIS
Generates a
Gentoo::Overlay::Group
object using a configuration file from your environment.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:$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
CLASS METHODS
load
Returns a working Overlay::Group object.
my $group = Gentoo::Overlay::Group::INI->load();
load_named
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');
load_all_does
Return all sections in a config file that
do
the given role.my ( @sections ) = Gentoo::Overlay::Group::INI->load_all_does('Some::Role');
load_all_isa
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');
PACKAGE VARIABLES
$CFG_PATHS
An array ref of Path::Tiny objects to scan for config files.
PRIVATE FUNCTIONS
_cf_paths
Fetch
$CFG_PATHS
, and initialize $CFG_PATHS if it isn't initialized.my $path_list = _cf_paths();
_init_cf_paths
Return the hard-coded array ref of paths to use, or parses
$ENV{GENTOO_OVERLAY_GROUP_INI_PATH}
.my $path_list = _init_cf_paths();
_enumerate_file_list
Returns a list of file paths to check, in the order they should be checked.
my @list = _enumerate_file_list();
_first_config_file
Returns the path to the first file that exists.
my $first = _first_config_file();
PRIVATE METHODS
_parse
AUTHOR
Kent Fredric <kentnl@cpan.org>
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install Gentoo::Overlay::Group::INI, copy and paste the appropriate command in to your terminal.
cpanm Gentoo::Overlay::Group::INI
perl -MCPAN -e shell install Gentoo::Overlay::Group::INI
For more information on module installation, please visit the detailed CPAN module installation guide.