OTWO-1300 Improves *.pl disambiguation to ignore smileys :-)
authorRobin Luckey <rluckey@blackducksoftware.com>
Wed, 8 Feb 2012 15:24:28 +0000 (10:24 -0500)
committerRobin Luckey <rluckey@blackducksoftware.com>
Wed, 8 Feb 2012 16:31:57 +0000 (11:31 -0500)
commit8aa2a6a058d65e414c24cbe53b7847d98a2945cf
tree51a347d814cbddeccb82a2d3a68bc1098f47ad69
parent140f487859b6b5da92752c29ae186882ae9449a5
OTWO-1300 Improves *.pl disambiguation to ignore smileys :-)

Smiley faces in Perl strings and comments look similar to Prolog
rule syntax. This patch makes two improvements:

 - Better detection of perl shebangs (#!%PERL% now recognized)
 - A prolog ':-' token must be followed by a space or a newline
src/detector.c
test/detect_files/perl_shebang_prolog_body.pl [new file with mode: 0644]
test/detect_files/perl_with_smiley.pl [new file with mode: 0644]
test/unit/detector_test.h