From: Christos Zoulas Date: Thu, 1 Mar 2007 22:25:00 +0000 (+0000) Subject: add more perl goo X-Git-Tag: FILE5_05~644 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c380c7a0deac9b136be14b9bf5aa22d1f64e979;p=file add more perl goo --- diff --git a/magic/Magdir/perl b/magic/Magdir/perl index c27fd059..23bb7a14 100644 --- a/magic/Magdir/perl +++ b/magic/Magdir/perl @@ -14,9 +14,15 @@ 0 string eval\ '(exit\ $?0)'\ &&\ eval\ 'exec perl script text # by Dmitry V. Levin and Alexey Tourbin +# check the first line 0 string package ->1 regex \^.{7}[\ \ ]+[A-Za-z_] ->>1 regex \^.{9}[\ \ ]*[0-9A-Za-z_:]*\ *; Perl5 module source text +>1 regex \^.{7}[\ \t]+[A-Za-z_] +>>1 regex \^.{9}[\ \t]*[0-9A-Za-z_:]*\ *; Perl5 module source text +# not 'p', check other lines +0 byte !0x70 +>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; +>>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=3D] Perl5 module source text + # Perl POD documents # From: Tom Hukins