summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa39
1 files changed, 19 insertions, 20 deletions
diff --git a/bin/efa b/bin/efa
index 5861a15..466ea61 100755
--- a/bin/efa
+++ b/bin/efa
@@ -283,6 +283,10 @@ else {
$opt->{accessibility} = [];
}
+if ( $opt->{exclude} ) {
+ @{ $opt->{exclude} } = split( qr{,}, join( q{,}, @{ $opt->{exclude} } ) );
+}
+
for my $field ( @{ $opt->{accessibility} } ) {
given ($field) {
when ( [qw[s no-stairs]] ) { $opt->{without_solid_stairs} = 1 }
@@ -309,18 +313,6 @@ if ( $opt->{arrive} and $opt->{depart} ) {
delete $opt->{arrive};
}
-if ( not( @from and @to ) ) {
- if ( @ARGV == 4 ) {
- ( @from[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
- }
- elsif ( @ARGV == 6 ) {
- ( @from[ 0, 1 ], @via[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
- }
- else {
- show_help(1);
- }
-}
-
if ( not defined $ignore_info ) {
$ignore_info = join(
q{|},
@@ -333,6 +325,21 @@ if ( not defined $ignore_info ) {
)
);
}
+elsif ( defined $ignore_info and length($ignore_info) == 0 ) {
+ $ignore_info = undef;
+}
+
+if ( not( @from and @to ) ) {
+ if ( @ARGV == 4 ) {
+ ( @from[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
+ }
+ elsif ( @ARGV == 6 ) {
+ ( @from[ 0, 1 ], @via[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
+ }
+ else {
+ show_help(1);
+ }
+}
for my $pair ( [ \@from, \$from_type ], [ \@via, \$via_type ],
[ \@to, \$to_type ], )
@@ -352,14 +359,6 @@ for my $pair ( [ \@from, \$from_type ], [ \@via, \$via_type ],
}
}
-if ( defined $opt->{'ignore-info'} and length( $opt->{'ignore-info'} ) == 0 ) {
- $opt->{'ignore-info'} = undef;
-}
-
-if ( $opt->{exclude} ) {
- $opt->{exclude} = [ split( qr{,}, join( q{,}, @{ $opt->{exclude} } ) ) ];
-}
-
if ( $opt->{service} ) {
my $service = first { lc( $_->{shortname} ) eq lc( $opt->{service} ) }
Travel::Routing::DE::EFA::get_efa_urls();