diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index c67ac8dd5c3391659c04a72b3c098b85d06b9481..21b06843759255333a4add7b4b7e1e8073ba8183 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -108,6 +108,10 @@ sub new { $service = 'DB'; } + if ( defined $service and not exists $hafas_instance{$service} ) { + confess("The service '$service' is not supported"); + } + my $ref = { active_service => $service, developer_mode => $conf{developer_mode},