4 use Locale::SubCountry;
5 use FS::UID qw(adminsuidsetup);
7 use FS::Record qw(qsearch);
8 use FS::cust_main_county;
10 my $user = shift or die &usage;
11 my $country = shift or die &usage;
13 adminsuidsetup($user);
15 my @country = qsearch('cust_main_county', { 'country' => $country } );
16 die "unknown country $country" unless (@country);
17 #die "$country already expanded" if scalar(@country) > 1;
19 foreach my $cust_main_county ( @country ) {
20 my $error = $cust_main_county->delete;
24 FS::Setup::_add_country($country);
27 die "Usage:\n\n expand-country user countrycode\n";