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

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