my $GAF = Geo::Address::Formatter->new( conf_path => '/tmp/does-not-exist/' );
which leads to an error message
No such file or directory at [...]/YAML/XS.pm line 48.
and an error for each
my $lines = $GAF->format_address($rh_address, {abbreviate => 1});Use of uninitialized value $template_text in hash element at [...]/Geo/Address/Formatter.pm line 208.
I would argue an invalid path to new() should lead to a fatal error so the script can't continue.
It's possible to call
my $GAF = Geo::Address::Formatter->new( conf_path => '/tmp/does-not-exist/' );
which leads to an error message
No such file or directory at [...]/YAML/XS.pm line 48.
and an error for each
my $lines = $GAF->format_address($rh_address, {abbreviate => 1});
Use of uninitialized value $template_text in hash element at [...]/Geo/Address/Formatter.pm line 208.
I would argue an invalid path to
new()
should lead to a fatal error so the script can't continue.