-1

Writing a driver script for my git hooks in Perl. Unfortunately, I keep getting this syntax error that doesn't make sense.

Can't locate Git/Hooks.pm in @INC (@INC contains: /path/to/myLibraries.)

I understand it is looking for Git/Hooks.pm in my include directories. Unfortunately, I only see the Git directory, but no Hooks.pm file.

I tried finding Hooks.pm on GitHub (i.e. source code of Git), but can't even find it there.

https://github.com/git/git/tree/master/perl/Git

The only thing I see in the library I am using is I18N.pm IndexInfo.pm SVN SVN.pm, which is exactly what I see for git's source code.

Does this file even exist...anywhere? If so, where and when I find it can I just copy it into the directory and call it good?

MrPickles
  • 1,255
  • 1
  • 16
  • 31

1 Answers1

2

It appears that your program includes use Git::Hooks;, but that you didn't install the module. You should use your system's package manager to install it if you're using your system perl.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • Where is that module located? Online somewhere? I'm googling and coming up with nothing. – MrPickles Jun 29 '15 at 21:30
  • Hopefully, in your systems package manager (`apt-get`? `yum`?). You should avoid installing modules for your system by any other means, but the risk of harm is mininal. If your package manager doesn't have it, `sudo cpan Git::Hook` should be fine. This will get it from CPAN, the repository for Perl modules. – ikegami Jun 29 '15 at 21:37
  • I found the module here https://github.com/gnustavo/Git-Hooks/blob/next/lib/Git/Hooks.pm since it was from a tutorial I was following. I can't find it on CPAN, though. – MrPickles Jun 29 '15 at 21:40
  • Like the first two times you asked, I'm going to recommend using your system's package manager (with `cpan` as a fallback). – ikegami Jun 29 '15 at 21:43
  • @MrPickles: [Here it is on CPAN](http://search.cpan.org/~gnustavo/Git-Hooks-1.3.0/lib/Git/Hooks.pm) – Borodin Jun 29 '15 at 23:23
  • I meant `cpan` the command line tool. The full command was posted above. – ikegami Jun 29 '15 at 23:26