NAME
App::GitHooks::Config - Configuration manager for App::GitHooks.
VERSION
Version 1.1.4
SYNOPSIS
my $config = App::GitHooks::Config->new();
my $config = App::GitHooks::Config->new(
file => '...',
);
my $value = $config->get( $section, $name );
METHODS
new()
Return a new App::GitHooks::Config
object.
my $config = App::GitHooks::Config->new(
file => $file,
);
Arguments:
file
An optional path to a config file to load into the object.
get()
Retrieve the value for a given section and key name.
my $value = $config->get( $section, $name );
Note that the App::GitHooks
configuration files are organized by sections, with the main (default) section being '_'.
get_regex()
Retrieve the specified regex for a given section and key name.
my $regex = $config->get_regex( $section, $name );
Note that this is very much like get()
, except that it will treat the value as a regex and strip out outer '/' symbols so that the result is suitable for inclusion in a regex. For example:
my $regex = $config->get_regex( $section, $name );
if ( $variable =~ /$regex/ )
{
...
}
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/App-GitHooks/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc App::GitHooks::Config
You can also look for information at:
GitHub's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
MetaCPAN
AUTHOR
Guillaume Aubert, <aubertg at cpan.org>
.
COPYRIGHT & LICENSE
Copyright 2013-2014 Guillaume Aubert.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/