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