]> granicus.if.org Git - file/commitdiff
add more perl goo
authorChristos Zoulas <christos@zoulas.com>
Thu, 1 Mar 2007 22:25:00 +0000 (22:25 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 1 Mar 2007 22:25:00 +0000 (22:25 +0000)
magic/Magdir/perl

index c27fd059b901088d15375b0ecfbd29a895e81678..23bb7a147f7ba494d04b908b6ad4d5801f0983c5 100644 (file)
 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 <tom@eborcom.com>