App::G...:Config(3pm)
β¨ NAME β¨
App::GitHooks::Config β the configuration manager for App::GitHooks, bestie π
No cap, this is the module that holds all your settings and hands them back when somebody asks nicely.
πΈ VERSION πΈ
Version 1.9.0 β she's giving stable, she's giving shipped π
π¦ SYNOPSIS π¦
my $config = App::GitHooks::Config->new();
my $config = App::GitHooks::Config->new(
file => '...',
);
my $value = $config->get( $section, $name );
Okay so that's the whole vibe: you make a config object, optionally point it at a file, and then you ask it for stuff. Simple. Iconic. Periodt π
π METHODS π
new()
Returns a brand new App::GitHooks::Config object β a fresh one, untouched, main character energy β¨
my $config = App::GitHooks::Config->new(
file => $file,
);
Arguments, bestie:
file(optional) β a path to a config file that you want loaded up into the object. That's it, that's the whole job πsource(optional) β this one tells you how the path of the config file to use was figured out. Like, the origin story of your config path π΅οΈβοΈ
get()
Grabs the value for a given section and key name. Your classic "hey what's the value of this thing" move π«Ά
my $value = $config->get( $section, $name );
Heads up! TheApp::GitHooksconfiguration files are organized by sections, and the main (default) section is'_'. Yes, literally an underscore. That's the main one. Remember it π
get_regex()
Retrieves the specified regex for a given section and key name β so basically the same errand as get(), but for regexes π
my $regex = $config->get_regex( $section, $name );
So the tea here: this is very much like get(), except it treats the value as a regex and strips out the outer / symbols, so that whatever comes back is suitable for inclusion in a regex. Which is lowkey the whole point. For example:
my $regex = $config->get_regex( $section, $name );
if ( $variable =~ /$regex/ )
{
...
}
See? Slipped right into the match. Chef's kiss π§
π BUGS π
Please report any bugs or feature requests through the web interface at <https://github.com/guillaumeaubert/App-GitHooks/issues/new>.
Not me asking you to file issues β but fr fr, the author will be notified, and then you'll automatically be notified of progress on your bug as changes get made. Mutual notif situation. We love a feedback loop π₯
π 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
<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>
π AUTHOR π
Guillaume Aubert <https://metacpan.org/author/AUBERTG>, "aubertg at cpan.org".
πΈ COPYRIGHT & LICENSE πΈ
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.
The caps are not me being dramatic, bestie, that's the actual legal disclaimer. No warranty, no promises, no refunds π
Okay that's the whole page! This one came from the perl v5.42.0 docs, dated 2025-07-25, and it lives in the User Contributed Perl Documentation section. Thanks for reading, ily, go configure something πβ¨
π¦ where this page comes from
- fedora 43: perl-App-GitHooks 1.9.0-27.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms