diff options
author | ivan <ivan> | 2009-02-25 20:05:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-02-25 20:05:42 +0000 |
commit | dae72a4ab1dc0a1afaf8d4f2debb509ade36233c (patch) | |
tree | 14001c5776c26924e7757a6dfd65a9c24e83e4da | |
parent | 8ce1d87506f8e0439b99496f46763cfc336e6a13 (diff) |
adding quick tool to change the "states" for japan
-rwxr-xr-x | bin/japan.pl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/japan.pl b/bin/japan.pl new file mode 100755 index 000000000..14e44e4ec --- /dev/null +++ b/bin/japan.pl @@ -0,0 +1,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"; + |