Unverified Commit 44ec8352 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

dbris-m: Add -m help; document -m

parent da30be22
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -145,6 +145,16 @@ if ( $date or $time ) {
	$opt{datetime} = $dt;
}

if ( $mots and $mots eq 'help' ) {
	say "Supported modes of transmit (-m / --modes-of-transit):";
	for my $mot (
		qw(ICE EC_IC IR REGIONAL SBAHN BUS SCHIFF UBAHN TRAM ANRUFPFLICHTIG))
	{
		say $mot;
	}
	exit 0;
}

if ($mots) {
	$opt{modes_of_transit} = [ split( qr{, *}, $mots ) ];
}
@@ -434,6 +444,11 @@ Print result(s) as JSON and exit. This is a dump of internal data structures
and not guaranteed to remain stable between minor versions. Please use the
Travel::Status::DE::DBRIS(3pm) module if you need a proper API.

=item B<-m>, B<--modes-of-transit> I<mot1>[,I<mot2>,...]

Only return results for the specified modes of transit.
Use C<<-m help>> to get a list of supported modes of transit.

=item B<--no-cache>

By default, if the Cache::File module is available, server replies are cached