Detect "use 5.xxx" as Perl

This commit is contained in:
Brandon Keepers
2015-02-09 10:19:36 -05:00
parent 74cd03de0b
commit bdc724d548
3 changed files with 5 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ module Linguist
disambiguate "Perl", "Perl6", "Prolog" do |data|
if data.include?("use v6")
Language["Perl6"]
elsif data.include?("use strict")
elsif data.match(/use strict|use\s+v?5\./)
Language["Perl"]
elsif data.include?(":-")
Language["Prolog"]