summaryrefslogtreecommitdiffstats
path: root/testing/resources/perl_hooks_repo
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/perl_hooks_repo')
-rw-r--r--testing/resources/perl_hooks_repo/.gitignore7
-rw-r--r--testing/resources/perl_hooks_repo/.pre-commit-hooks.yaml5
-rw-r--r--testing/resources/perl_hooks_repo/MANIFEST4
-rw-r--r--testing/resources/perl_hooks_repo/Makefile.PL10
-rwxr-xr-xtesting/resources/perl_hooks_repo/bin/pre-commit-perl-hello7
-rw-r--r--testing/resources/perl_hooks_repo/lib/PreCommitHello.pm12
6 files changed, 45 insertions, 0 deletions
diff --git a/testing/resources/perl_hooks_repo/.gitignore b/testing/resources/perl_hooks_repo/.gitignore
new file mode 100644
index 0000000..7af9940
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/.gitignore
@@ -0,0 +1,7 @@
+/MYMETA.json
+/MYMETA.yml
+/Makefile
+/PreCommitHello-*.tar.*
+/PreCommitHello-*/
+/blib/
+/pm_to_blib
diff --git a/testing/resources/perl_hooks_repo/.pre-commit-hooks.yaml b/testing/resources/perl_hooks_repo/.pre-commit-hooks.yaml
new file mode 100644
index 0000000..11e6f6c
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/.pre-commit-hooks.yaml
@@ -0,0 +1,5 @@
+- id: perl-hook
+ name: perl example hook
+ entry: pre-commit-perl-hello
+ language: perl
+ files: ''
diff --git a/testing/resources/perl_hooks_repo/MANIFEST b/testing/resources/perl_hooks_repo/MANIFEST
new file mode 100644
index 0000000..4a20084
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/MANIFEST
@@ -0,0 +1,4 @@
+MANIFEST
+Makefile.PL
+bin/pre-commit-perl-hello
+lib/PreCommitHello.pm
diff --git a/testing/resources/perl_hooks_repo/Makefile.PL b/testing/resources/perl_hooks_repo/Makefile.PL
new file mode 100644
index 0000000..6c70e10
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/Makefile.PL
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => "PreCommitHello",
+ VERSION_FROM => "lib/PreCommitHello.pm",
+ EXE_FILES => [qw(bin/pre-commit-perl-hello)],
+);
diff --git a/testing/resources/perl_hooks_repo/bin/pre-commit-perl-hello b/testing/resources/perl_hooks_repo/bin/pre-commit-perl-hello
new file mode 100755
index 0000000..9474009
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/bin/pre-commit-perl-hello
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use PreCommitHello;
+
+PreCommitHello::hello();
diff --git a/testing/resources/perl_hooks_repo/lib/PreCommitHello.pm b/testing/resources/perl_hooks_repo/lib/PreCommitHello.pm
new file mode 100644
index 0000000..c76521c
--- /dev/null
+++ b/testing/resources/perl_hooks_repo/lib/PreCommitHello.pm
@@ -0,0 +1,12 @@
+package PreCommitHello;
+
+use strict;
+use warnings;
+
+our $VERSION = "0.1.0";
+
+sub hello {
+ print "Hello from perl-commit Perl!\n";
+}
+
+1;