App-whatthecommit
view release on metacpan or search on metacpan
lib/App/whatthecommit.pm view on Meta::CPAN
our $HOOK
= 'echo $(curl -L http://whatthecommit.com/ 2>/dev/null | grep -Po \'(?<=\<p\>).*$\') > "$1"';
sub goodie($) {
my $git = shift;
my $prepare_commit_msg = $git . "/.git/hooks/prepare-commit-msg";
open my $REPO, ">$prepare_commit_msg"
or die( print "Cannot open $prepare_commit_msg\n" );
print $REPO $HOOK;
close $REPO;
chmod 0755, $prepare_commit_msg;
print "[$git] You are good to go, try to commit in your repo now\n";
}
__END__
=encoding utf-8
=head1 NAME
App::whatthecommit - Add a prepare-commit-msg to your git repository that uses whatthecommit.com to generate random commit messages
( run in 0.261 second using v1.01-cache-2.11-cpan-496ff517765 )