Skip to content

Commit

Permalink
Reduce the number of loaded modules with the -S option
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 19, 2023
1 parent 6b67e9e commit 67d3ae2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ if($opts{'B'}) {
} else {
push @modules, 'GIS::Distance';
}
unless(($opts{'T'} || $opts{'O'}) && !$opts{'v'}) {
unless(($opts{'T'} || $opts{'O'} || $opts{'S'}) && !$opts{'v'}) {
push @modules, 'Geo::Coder::List', 'Geo::Coder::Free', 'Geo::Coder::Free::Local',
'Geo::Coder::CA', 'Geo::Coder::Postcodes',
# 'Geo::Coder::DataScienceToolkit',
Expand Down Expand Up @@ -306,7 +306,7 @@ if($opts{'w'}) {
if($opts{'c'}) {
push @modules, 'URI::Find::Schemeless';
}
if((!$opts{'O'}) && (!$opts{'T'})) {
if((!$opts{'O'}) && (!$opts{'T'}) && (!$opts{'S'})) {
if($ENV{'GEO_CODER_OPENCAGE_API_KEY'}) {
push @modules, 'Geo::Coder::OpenCage';
}
Expand Down Expand Up @@ -584,7 +584,7 @@ if($opts{'v'}) {

my $geocoder;
my $textgeocoder;
if(((!$opts{'T'}) && (!$opts{'O'})) || $opts{'v'}) {
if(((!$opts{'T'}) && (!$opts{'O'} && (!$opts{'S'}))) || $opts{'v'}) {
$geocoder = Geo::Coder::List->new($gopts)->push(Geo::Coder::Free::Local->new());

my %topts;
Expand Down

0 comments on commit 67d3ae2

Please sign in to comment.