]> granicus.if.org Git - file/commitdiff
perl: re-strengthen hash-bang patterns
authorReuben Thomas <rrt@sc3d.org>
Tue, 7 Jun 2016 23:28:37 +0000 (23:28 +0000)
committerReuben Thomas <rrt@sc3d.org>
Tue, 7 Jun 2016 23:28:37 +0000 (23:28 +0000)
They were being out-matched by the catch-all varied.script patterns, and
thus losing their MIME types.

hash-bang patterns have to be at the very start of the file, so donĂ¢\80\99t need
the leeway that the other patterns have been given.

magic/Magdir/perl

index 127a373922228aa64413d48465f7240c1a2b140a..099a22d11298611169c7fa9f38866e2ee6257f29 100644 (file)
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: perl,v 1.24 2015/03/27 17:58:58 christos Exp $
+# $File: perl,v 1.25 2016/06/07 23:28:37 rrt Exp $
 # perl:  file(1) magic for Larry Wall's perl language.
 #
 # The `eval' lines recognizes an outrageously clever hack.
 !:mime text/x-perl
 0      search/1024     eval\ '(exit\ $?0)'\ &&\ eval\ 'exec    Perl script text
 !:mime text/x-perl
-0      search/1024     #!/usr/bin/env\ perl    Perl script text executable
+0      string  #!/usr/bin/env\ perl    Perl script text executable
 !:mime text/x-perl
-0      search/1024     #!\ /usr/bin/env\ perl  Perl script text executable
+0      string  #!\ /usr/bin/env\ perl  Perl script text executable
 !:mime text/x-perl
-0      search/1024     #!
+0      string  #!
 >0     regex   \^#!.*/bin/perl([[:space:]].*)*$        Perl script text executable
 !:mime text/x-perl