Common/MIME.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Common/LogLevel.pm ↑ Summary Common/Permission.pm »
1 package Enum::Declare::Common::MIME;
2  
3 1 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Enum::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 enum Type :Str :Type :Export {
10 TextPlain = "text/plain",
11 TextHtml = "text/html",
12 TextCss = "text/css",
13 TextCsv = "text/csv",
14 TextXml = "text/xml",
15 TextJavascript = "text/javascript",
16 TextMarkdown = "text/markdown",
17 ApplicationJson = "application/json",
18 ApplicationXml = "application/xml",
19 ApplicationPdf = "application/pdf",
20 ApplicationZip = "application/zip",
21 ApplicationGzip = "application/gzip",
22 ApplicationTar = "application/x-tar",
23 ApplicationFormUrlencoded = "application/x-www-form-urlencoded",
24 ApplicationOctetStream = "application/octet-stream",
25 ApplicationJavascript = "application/javascript",
26 ApplicationLdJson = "application/ld+json",
27 ApplicationMsgpack = "application/msgpack",
28 ApplicationYaml = "application/yaml",
29 ApplicationWasm = "application/wasm",
30 ApplicationSql = "application/sql",
31 MultipartFormData = "multipart/form-data",
32 MultipartByteranges = "multipart/byteranges",
33 ImagePng = "image/png",
34 ImageJpeg = "image/jpeg",
35 ImageGif = "image/gif",
36 ImageSvg = "image/svg+xml",
37 ImageWebp = "image/webp",
38 ImageAvif = "image/avif",
39 ImageBmp = "image/bmp",
40 ImageTiff = "image/tiff",
41 ImageIco = "image/x-icon",
42 AudioMpeg = "audio/mpeg",
43 AudioOgg = "audio/ogg",
44 AudioWav = "audio/wav",
45 AudioWebm = "audio/webm",
46 AudioFlac = "audio/flac",
47 AudioAac = "audio/aac",
48 VideoMp4 = "video/mp4",
49 VideoWebm = "video/webm",
50 VideoOgg = "video/ogg",
51 VideoMpeg = "video/mpeg",
52 VideoQuicktime = "video/quicktime",
53 FontWoff = "font/woff",
54 FontWoff2 = "font/woff2",
55 FontTtf = "font/ttf",
56 FontOtf = "font/otf"
57 1 };
58  
59 1 1;
60  
61 =head1 NAME
62  
63 Enum::Declare::Common::MIME - Common MIME type constants
64  
65 =head1 SYNOPSIS
66  
67 use Enum::Declare::Common::MIME;
68  
69 say ApplicationJson; # "application/json"
70 say ImagePng; # "image/png"
71 say TextHtml; # "text/html"
72  
73 my $meta = Type();
74 ok($meta->valid('application/json'));
75  
76 =head1 ENUMS
77  
78 =head2 Type :Str :Export
79  
80 48 common MIME types covering text, application, image, audio, video,
81 multipart, and font categories.
82  
83 =head1 AUTHOR
84  
85 LNATION C<< <email@lnation.org> >>
86  
87 =head1 LICENSE AND COPYRIGHT
88  
89 Copyright 2026 LNATION. Artistic License 2.0.
90  
91 =cut
« Common/LogLevel.pm ↑ Summary Common/Permission.pm »