blob: 14e44e4ecca7bef99a6398fd27c2ccd1da6786c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/usr/bin/perl
use FS::UID qw( adminsuidsetup );
use FS::Record qw( qsearch );
use FS::cust_main_county;
adminsuidsetup shift;
my $country = 'JP';
foreach my $cust_main_county (
qsearch('cust_main_county', { 'country' => $country } )
) {
if ( $cust_main_county->state =~ /\[([\w ]+)\]\s*$/ ) {
$cust_main_county->state($1);
my $error = $cust_main_county->replace;
die $error if $error;
}
}
#use Locale::SubCountry;
#
##my $state = 'Tôkyô [Tokyo]';
#my $state = 'Tottori';
#
#my $lsc = new Locale::SubCountry 'JP';
#
#print $lsc->code($state)."\n";
|