summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--magic/Magdir/perl8
1 files changed, 5 insertions, 3 deletions
diff --git a/magic/Magdir/perl b/magic/Magdir/perl
index 23bb7a14..a8daee4c 100644
--- a/magic/Magdir/perl
+++ b/magic/Magdir/perl
@@ -13,15 +13,17 @@
0 string eval\ "exec\ /usr/local/bin/perl perl script text executable
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}[\ \t]+[A-Za-z_]
->>1 regex \^.{9}[\ \t]*[0-9A-Za-z_:]*\ *; Perl5 module source text
+>1 regex \^package[\ \t]+[A-Za-z_]
+>>1 regex \^package[\ \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
+>>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
+
# Perl POD documents