App::GitHooks::Config - Configuration manager for App::GitHooks.
Version 1.9.0
my $config = App::GitHooks::Config->new(); my $config = App::GitHooks::Config->new( file => '...', ); my $value = $config->get( $section, $name );
Return a new App::GitHooks::Config object.
App::GitHooks::Config
my $config = App::GitHooks::Config->new( file => $file, );
Arguments:
file (optional)
A path to a config file to load into the object.
source (optional)
How the path of the config file to use was determined.
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 '_'.
App::GitHooks
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:
get()
my $regex = $config->get_regex( $section, $name ); if ( $variable =~ /$regex/ ) { ... }
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.
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
https://github.com/guillaumeaubert/App-GitHooks/issues
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/app-githooks
CPAN Ratings
http://cpanratings.perl.org/d/app-githooks
MetaCPAN
https://metacpan.org/release/App-GitHooks
Guillaume Aubert, <aubertg at cpan.org>.
<aubertg at cpan.org>
Copyright 2013-2017 Guillaume Aubert.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
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 LICENSE file for more details.
To install App::GitHooks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::GitHooks
CPAN shell
perl -MCPAN -e shell install App::GitHooks
For more information on module installation, please visit the detailed CPAN module installation guide.