From fc6ab54ebdd3956801ddaca6958fdad43599b0d4 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Sun, 8 Dec 2013 23:33:18 +0000 Subject: [PATCH] PR/304: Use a regex because people install perl in non-standard places --- magic/Magdir/perl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/magic/Magdir/perl b/magic/Magdir/perl index ef0cc6de..928d21c1 100644 --- a/magic/Magdir/perl +++ b/magic/Magdir/perl @@ -1,20 +1,14 @@ #------------------------------------------------------------------------------ -# $File: perl,v 1.19 2012/06/20 21:16:25 christos Exp $ +# $File: perl,v 1.20 2012/06/21 01:16:49 christos Exp $ # perl: file(1) magic for Larry Wall's perl language. # # The `eval' lines recognizes an outrageously clever hack. # Keith Waclena # Send additions to -0 search/1/w #!\ /bin/perl Perl script text executable -!:mime text/x-perl 0 search/1 eval\ "exec\ /bin/perl Perl script text !:mime text/x-perl -0 search/1/w #!\ /usr/bin/perl Perl script text executable -!:mime text/x-perl 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text !:mime text/x-perl -0 search/1/w #!\ /usr/local/bin/perl Perl script text executable -!:mime text/x-perl 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text !:mime text/x-perl 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text @@ -23,6 +17,9 @@ !:mime text/x-perl 0 search/1 #!\ /usr/bin/env\ perl Perl script text executable !:mime text/x-perl +0 search/1 #! +>0 regex \^#!.*/bin/perl$ Perl script text executable +!:mime text/x-perl # by Dmitry V. Levin and Alexey Tourbin # check the first line -- 2.40.0