path: root/t/
diff options
authorJonathan Nieder <>2010-12-26 09:07:31 (GMT)
committerJunio C Hamano <>2010-12-27 16:47:21 (GMT)
commit71a5d4bc0e4025b3fbdeed76052b39fcef284e8c (patch)
tree4d26bd18d48ba8f87f3e3e3a05be3ff48af3f44b /t/
parent73e7b2ef6c62b3ec345b557acb71a8da4798c70d (diff)
diff: funcname and word patterns for perl
The default function name discovery already works quite well for Perl code... with the exception of here-documents (or rather their ending). sub foo { print <<END here-document END return 1; } The default funcname pattern treats the unindented END line as a function declaration and puts it in the @@ line of diff and "grep --show-function" output. With a little knowledge of perl syntax, we can do better. You can try it out by adding "*.perl diff=perl" to the gitattributes file. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 1 deletions
diff --git a/t/ b/t/
index 0a61b57..3646930 100755
--- a/t/
+++ b/t/
@@ -32,7 +32,7 @@ EOF
sed 's/beer\\/beer,\\/' < >
-builtin_patterns="bibtex cpp csharp fortran html java objc pascal php python ruby tex"
+builtin_patterns="bibtex cpp csharp fortran html java objc pascal perl php python ruby tex"
for p in $builtin_patterns
test_expect_success "builtin $p pattern compiles" '