| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MIME::Detect::FreeDesktopOrgDB; |
|
2
|
3
|
|
|
3
|
|
23
|
use strict; |
|
|
3
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
97
|
|
|
3
|
3
|
|
|
3
|
|
1491
|
use File::ShareDir 'dist_file'; |
|
|
3
|
|
|
|
|
71298
|
|
|
|
3
|
|
|
|
|
502
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
MIME::Detect::FreeDesktopOrgDB - default freedesktop.org database |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NOTICE |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
This distribution contains a verbatim copy of the freedesktop.org |
|
13
|
|
|
|
|
|
|
MIME database available from |
|
14
|
|
|
|
|
|
|
L |
|
15
|
|
|
|
|
|
|
. |
|
16
|
|
|
|
|
|
|
That database is licensed under the General Public License v2, |
|
17
|
|
|
|
|
|
|
see the accompanying COPYING file distributed with the file |
|
18
|
|
|
|
|
|
|
for its exact terms. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
|
21
|
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
0
|
0
|
sub url {'https://www.freedesktop.org/wiki/Software/shared-mime-info/'} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 C<< get_xml >> |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $xml = MIME::Detect::FreeDesktopOrgDB->get_xml; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Returns a reference to the XML string from C distributed |
|
29
|
|
|
|
|
|
|
with this module. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_xml { |
|
34
|
3
|
|
|
3
|
1
|
37
|
(my $xml_name = dist_file('MIME-Detect', 'mime-info/freedesktop.org.xml')); |
|
35
|
3
|
50
|
|
|
|
729
|
open my $fh, '<', $xml_name |
|
36
|
|
|
|
|
|
|
or die "Couldn't read '$xml_name': $!"; |
|
37
|
3
|
|
|
|
|
13
|
binmode $fh; |
|
38
|
3
|
|
|
|
|
17
|
local $/; |
|
39
|
|
|
|
|
|
|
return \<$fh> |
|
40
|
3
|
|
|
|
|
11298
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 REPOSITORY |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
The public repository of this module is |
|
47
|
|
|
|
|
|
|
L. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SUPPORT |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
The public support forum of this module is |
|
52
|
|
|
|
|
|
|
L. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 BUG TRACKER |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Please report bugs in this module via the RT CPAN bug queue at |
|
57
|
|
|
|
|
|
|
L |
|
58
|
|
|
|
|
|
|
or via mail to L. |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Max Maischein C |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT (c) |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Copyright 2015-2018 by Max Maischein C. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 LICENSE |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This module is released under the same terms as Perl itself. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |