[freeside-commits] freeside/bin japan.pl,NONE,1.1
Ivan,,,
ivan at wavetail.420.am
Wed Feb 25 12:05:44 PST 2009
Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv19977
Added Files:
japan.pl
Log Message:
adding quick tool to change the "states" for japan
--- NEW FILE: japan.pl ---
#!/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";
More information about the freeside-commits
mailing list