File Coverage

blib/lib/Enum/Declare/Common/Encoding.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Enum::Declare::Common::Encoding;
2              
3 1     1   82519 use 5.014;
  1         3  
4 1     1   9 use strict;
  1         2  
  1         19  
5 1     1   4 use warnings;
  1         3  
  1         85  
6              
7 1     1   562 use Enum::Declare;
  1         9894  
  1         388  
8              
9             enum Type :Str :Type :Export {
10             UTF8 = "utf-8",
11             UTF16LE = "utf-16le",
12             UTF16BE = "utf-16be",
13             UTF32LE = "utf-32le",
14             UTF32BE = "utf-32be",
15             ASCII = "ascii",
16             Latin1 = "iso-8859-1",
17             ISO8859_2 = "iso-8859-2",
18             ISO8859_3 = "iso-8859-3",
19             ISO8859_4 = "iso-8859-4",
20             ISO8859_5 = "iso-8859-5",
21             ISO8859_6 = "iso-8859-6",
22             ISO8859_7 = "iso-8859-7",
23             ISO8859_8 = "iso-8859-8",
24             ISO8859_9 = "iso-8859-9",
25             ISO8859_10 = "iso-8859-10",
26             ISO8859_13 = "iso-8859-13",
27             ISO8859_14 = "iso-8859-14",
28             ISO8859_15 = "iso-8859-15",
29             Windows1250 = "windows-1250",
30             Windows1251 = "windows-1251",
31             Windows1252 = "windows-1252",
32             Windows1253 = "windows-1253",
33             Windows1254 = "windows-1254",
34             Windows1255 = "windows-1255",
35             Windows1256 = "windows-1256",
36             ShiftJIS = "shift_jis",
37             EUCJP = "euc-jp",
38             ISO2022JP = "iso-2022-jp",
39             GB2312 = "gb2312",
40             GBK = "gbk",
41             GB18030 = "gb18030",
42             Big5 = "big5",
43             EUCKR = "euc-kr",
44             KOI8R = "koi8-r",
45             KOI8U = "koi8-u"
46             };
47              
48             1;
49              
50             =head1 NAME
51              
52             Enum::Declare::Common::Encoding - Character encoding name constants
53              
54             =head1 SYNOPSIS
55              
56             use Enum::Declare::Common::Encoding;
57              
58             say UTF8; # "utf-8"
59             say ASCII; # "ascii"
60             say ShiftJIS; # "shift_jis"
61             say Latin1; # "iso-8859-1"
62              
63             =head1 ENUMS
64              
65             =head2 Type :Str :Export
66              
67             36 character encoding constants covering Unicode (UTF-8/16/32), ASCII,
68             ISO-8859 variants, Windows code pages, CJK encodings (Shift_JIS, EUC-JP,
69             GB2312, GBK, GB18030, Big5, EUC-KR), and Cyrillic (KOI8-R, KOI8-U).
70              
71             =head1 AUTHOR
72              
73             LNATION C<< >>
74              
75             =head1 LICENSE AND COPYRIGHT
76              
77             Copyright 2026 LNATION. Artistic License 2.0.
78              
79             =cut