perl revision 1.1.1.5 1 #------------------------------------------------------------------------------
2 # $File: perl,v 1.22 2014/04/28 12:04:35 christos Exp $
3 # perl: file(1) magic for Larry Wall's perl language.
4 #
5 # The `eval' lines recognizes an outrageously clever hack.
6 # Keith Waclena <keith (a] cerberus.uchicago.edu>
7 # Send additions to <perl5-porters (a] perl.org>
8 0 search/1 eval\ "exec\ /bin/perl Perl script text
9 !:mime text/x-perl
10 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text
11 !:mime text/x-perl
12 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text
13 !:mime text/x-perl
14 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text
15 !:mime text/x-perl
16 0 search/1 #!/usr/bin/env\ perl Perl script text executable
17 !:mime text/x-perl
18 0 search/1 #!\ /usr/bin/env\ perl Perl script text executable
19 !:mime text/x-perl
20 0 search/1 #!
21 >0 regex \^#!.*/bin/perl$ Perl script text executable
22 !:mime text/x-perl
23
24 # by Dmitry V. Levin and Alexey Tourbin
25 # check the first line
26 0 search/1 package
27 >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
28 !:strength + 10
29 # not 'p', check other lines
30 0 search/1 !p
31 >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
32 >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
33 !:strength + 10
34
35 # Perl POD documents
36 # From: Tom Hukins <tom (a] eborcom.com>
37 0 search/1/W \=pod\n Perl POD document text
38 0 search/1/W \n\=pod\n Perl POD document text
39 0 search/1/W \=head1\ Perl POD document text
40 0 search/1/W \n\=head1\ Perl POD document text
41 0 search/1/W \=head2\ Perl POD document text
42 0 search/1/W \n\=head2\ Perl POD document text
43 0 search/1/W \=encoding\ Perl POD document text
44 0 search/1/W \n\=encoding\ Perl POD document text
45
46
47 # Perl Storable data files.
48 0 string perl-store perl Storable (v0.6) data
49 >4 byte >0 (net-order %d)
50 >>4 byte &01 (network-ordered)
51 >>4 byte =3 (major 1)
52 >>4 byte =2 (major 1)
53
54 0 string pst0 perl Storable (v0.7) data
55 >4 byte >0
56 >>4 byte &01 (network-ordered)
57 >>4 byte =5 (major 2)
58 >>4 byte =4 (major 2)
59 >>5 byte >0 (minor %d)
60
61 # This is Debian #742949 by Zefram <zefram (a] fysh.org>:
62 # -----------------------------------------------------------
63 # The Perl module Hash::SharedMem
64 # <https://metacpan.org/release/Hash-SharedMem> defines a file format
65 # for a key/value store. Details of the file format are in the "DESIGN"
66 # file in the module distribution. Magic:
67 0 bequad =0xa58afd185cbf5af7 Hash::SharedMem master file, big-endian
68 >8 bequad <0x1000000
69 >>15 byte >2 \b, line size 2^%d byte
70 >>14 byte >2 \b, page size 2^%d byte
71 >>13 byte &1
72 >>>13 byte >1 \b, max fanout %d
73 0 lequad =0xa58afd185cbf5af7 Hash::SharedMem master file, little-endian
74 >8 lequad <0x1000000
75 >>8 byte >2 \b, line size 2^%d byte
76 >>9 byte >2 \b, page size 2^%d byte
77 >>10 byte &1
78 >>>10 byte >1 \b, max fanout %d
79 0 bequad =0xc693dac5ed5e47c2 Hash::SharedMem data file, big-endian
80 >8 bequad <0x1000000
81 >>15 byte >2 \b, line size 2^%d byte
82 >>14 byte >2 \b, page size 2^%d byte
83 >>13 byte &1
84 >>>13 byte >1 \b, max fanout %d
85 0 lequad =0xc693dac5ed5e47c2 Hash::SharedMem data file, little-endian
86 >8 lequad <0x1000000
87 >>8 byte >2 \b, line size 2^%d byte
88 >>9 byte >2 \b, page size 2^%d byte
89 >>10 byte &1
90 >>>10 byte >1 \b, max fanout %d
91