line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Win32::Codepage::Simple; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
51910
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
635
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw(get_codepage get_acp get_oemcp); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $get_acp; |
13
|
|
|
|
|
|
|
our $get_oemcp; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
&_init; |
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _init |
19
|
|
|
|
|
|
|
{ |
20
|
|
|
|
|
|
|
eval |
21
|
2
|
|
|
2
|
|
4
|
{ |
22
|
2
|
|
|
|
|
14
|
local($SIG{__DIE__}, $@) = 'DEFAULT'; |
23
|
2
|
|
|
|
|
775
|
require Win32::API; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$get_acp = Win32::API->new("kernel32", "GetACP", "", "N"); |
26
|
0
|
|
|
|
|
|
$get_oemcp = Win32::API->new("kernel32", "GetOEMCP", "", "N"); |
27
|
0
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub get_codepage |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
0
|
1
|
|
&get_acp; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub get_acp |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
0
|
|
0
|
1
|
|
$get_acp && $get_acp->Call(); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_oemcp |
42
|
|
|
|
|
|
|
{ |
43
|
0
|
0
|
|
0
|
1
|
|
$get_oemcp && $get_oemcp->Call(); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Win32::Codepage::Simple - get codepage, simply |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Version 0.01 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
use Win32::Codepage::Simple qw(get_codepage); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $cpnum = get_codepage(); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 EXPORT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
A list of functions that can be exported. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 get_codepage() |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
synonym for get_acp. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 get_acp() |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
get ansi code page. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 get_oemcp() |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
get oem code page. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
YAMASHINA Hio, C<< >> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 BUGS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
83
|
|
|
|
|
|
|
C, or through the web interface at |
84
|
|
|
|
|
|
|
L. |
85
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
86
|
|
|
|
|
|
|
your bug as I make changes. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 SUPPORT |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
perldoc Win32::Codepage::Simple |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
You can also look for information at: |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * CPAN Ratings |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * Search CPAN |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=back |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Copyright 2006 YAMASHINA Hio, all rights reserved. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
121
|
|
|
|
|
|
|
under the same terms as Perl itself. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
126
|
|
|
|
|
|
|
# End of File. |
127
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |