Git::Repository::Plugin::Hooks - Work with hooks in a Git::Repository
use Git::Repository 'Hooks'; my $r = Git::Repository->new(); $r->install_hook('my-hook-file', 'pre-receive');
Git::Repository::Plugin::Hooks adds the install_hook and hook_path methods to a Git::Repository.
install_hook
hook_path
Install a $target, e.g. 'pre-receive', hook into the repository.
$target
Returns the path to a hook of the type specified by $target. See man githooks for examples, e.g. pre-commit.
man githooks
pre-commit
Copyright (C) Nathaniel Nutter.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Nathaniel Nutter <nnutter@cpan.org>
To install Git::Repository::Plugin::Hooks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Repository::Plugin::Hooks
CPAN shell
perl -MCPAN -e shell install Git::Repository::Plugin::Hooks
For more information on module installation, please visit the detailed CPAN module installation guide.