line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geography::States::NoUnicodeWarnings; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
681
|
use 5.010; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
20
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
6
|
1
|
|
|
1
|
|
4
|
no warnings 'uninitialized'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
768
|
use Module::Load; |
|
1
|
|
|
|
|
1021
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.004'; |
11
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Geography::States::NoUnicodeWarnings - use Geography::States without warnings |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use open ':encoding(utf8)'; |
20
|
|
|
|
|
|
|
use Geography::States::NoUnicodeWarnings; |
21
|
|
|
|
|
|
|
# STDERR is not full of warnings about characters not mapping to Unicode |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Geography::States is a decent Perl module, tried and tested. It hasn't updated |
26
|
|
|
|
|
|
|
for a while, but then e.g. the USA, Canada etc. haven't added states recently, |
27
|
|
|
|
|
|
|
so there hasn't been a need. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Under certain circumstances - specifically if you have set a global character |
30
|
|
|
|
|
|
|
encoding for PerlIO - using Geography::States may cause warnings at compile- |
31
|
|
|
|
|
|
|
time. Or it may not; you may be lucky. I haven't managed to narrow down |
32
|
|
|
|
|
|
|
exactly what causes the lack of warnings - it's not simply a matter of locale, |
33
|
|
|
|
|
|
|
for instance - but flavours of Perl between 5.10 and 5.14 appear to be |
34
|
|
|
|
|
|
|
affected. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This module fixes that. Just say C |
37
|
|
|
|
|
|
|
where you would otherwise have said C |
38
|
|
|
|
|
|
|
will go away. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
The Brazilian States that give the warnings will probably not be corrupted, |
41
|
|
|
|
|
|
|
although they may not be proper Unicode. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
{ |
46
|
1
|
|
|
1
|
|
69
|
use open ':std'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
47
|
|
|
|
|
|
|
Module::Load::load('Geography::States'); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Sam Kington |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
The source code for this module is hosted on GitHub |
55
|
|
|
|
|
|
|
L - this is |
56
|
|
|
|
|
|
|
probably the best place to look for suggestions and feedback. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 COPYRIGHT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright (c) 2015 Sam Kington |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |