Blame SOURCES/file-5.11-perl-shebang.patch

89be67
diff --git a/magic/Magdir/perl b/magic/Magdir/perl
89be67
index ef0cc6d..453665c 100644
89be67
--- a/magic/Magdir/perl
89be67
+++ b/magic/Magdir/perl
89be67
@@ -5,24 +5,22 @@
89be67
 # The `eval' lines recognizes an outrageously clever hack.
89be67
 # Keith Waclena <keith@cerberus.uchicago.edu>
89be67
 # Send additions to <perl5-porters@perl.org>
89be67
-0	search/1/w	#!\ /bin/perl			Perl script text executable
89be67
-!:mime	text/x-perl
89be67
 0	search/1	eval\ "exec\ /bin/perl		Perl script text
89be67
 !:mime	text/x-perl
89be67
-0	search/1/w	#!\ /usr/bin/perl		Perl script text executable
89be67
-!:mime	text/x-perl
89be67
 0	search/1	eval\ "exec\ /usr/bin/perl	Perl script text
89be67
 !:mime	text/x-perl
89be67
-0	search/1/w	#!\ /usr/local/bin/perl		Perl script text executable
89be67
-!:mime	text/x-perl
89be67
 0	search/1	eval\ "exec\ /usr/local/bin/perl	Perl script text
89be67
 !:mime	text/x-perl
89be67
 0	search/1	eval\ '(exit\ $?0)'\ &&\ eval\ 'exec	Perl script text
89be67
 !:mime	text/x-perl
89be67
-0	search/1	#!/usr/bin/env\ perl	Perl script text executable
89be67
-!:mime	text/x-perl
89be67
-0	search/1	#!\ /usr/bin/env\ perl	Perl script text executable
89be67
-!:mime	text/x-perl
89be67
+
89be67
+0   search/1    #!
89be67
+>0  regex       \^#!.*/bin/perl.*$  Perl script text executable
89be67
+!:mime  text/x-perl
89be67
+>0  regex       \^#!.*/bin/env\ perl.*$  Perl script text executable
89be67
+!:mime  text/x-perl
89be67
+# to be tried before awk script
89be67
+!:strength + 40
89be67
 
89be67
 # by Dmitry V. Levin and Alexey Tourbin
89be67
 # check the first line