diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-10-26 21:51:31 +0100 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-10-26 21:51:31 +0100 | 
| commit | ed5c5e523cf3c392c453ab45642d8db409335a99 (patch) | |
| tree | 3b02854c5e6929d87641ee0f58668cadf7ddb7c9 /lib/Travelynx/Helper | |
| parent | f987ae593b0363312f211c87c4fbce296b99d128 (diff) | |
dbris: set developer_mode when travelynx is running in debug mode
Diffstat (limited to 'lib/Travelynx/Helper')
| -rw-r--r-- | lib/Travelynx/Helper/DBRIS.pm | 34 | 
1 files changed, 19 insertions, 15 deletions
| diff --git a/lib/Travelynx/Helper/DBRIS.pm b/lib/Travelynx/Helper/DBRIS.pm index b5f30b2..94746cc 100644 --- a/lib/Travelynx/Helper/DBRIS.pm +++ b/lib/Travelynx/Helper/DBRIS.pm @@ -55,9 +55,10 @@ sub geosearch_p {  	my ( $self, %opt ) = @_;  	return Travel::Status::DE::DBRIS->new_p( -		promise    => 'Mojo::Promise', -		user_agent => $self->get_agent, -		geoSearch  => \%opt, +		promise        => 'Mojo::Promise', +		user_agent     => $self->get_agent, +		geoSearch      => \%opt, +		developer_mode => $self->{log}->is_level('debug') ? 1 : 0,  	);  } @@ -73,8 +74,9 @@ sub get_station_id_p {  			timeout => 10,  			agent   => $self->{header}{'User-Agent'},  		}, -		promise    => 'Mojo::Promise', -		user_agent => $self->get_agent, +		promise        => 'Mojo::Promise', +		user_agent     => $self->get_agent, +		developer_mode => $self->{log}->is_level('debug') ? 1 : 0,  	)->then(  		sub {  			my ($dbris) = @_; @@ -115,11 +117,12 @@ sub get_departures_p {  	)->subtract( minutes => $opt{lookbehind} );  	return Travel::Status::DE::DBRIS->new_p( -		station    => $opt{station}, -		datetime   => $when, -		cache      => $self->{realtime_cache}, -		promise    => 'Mojo::Promise', -		user_agent => $self->get_agent->request_timeout(10), +		station        => $opt{station}, +		datetime       => $when, +		cache          => $self->{realtime_cache}, +		promise        => 'Mojo::Promise', +		user_agent     => $self->get_agent->request_timeout(10), +		developer_mode => $self->{log}->is_level('debug') ? 1 : 0,  	);  } @@ -129,11 +132,12 @@ sub get_journey_p {  	my $promise = Mojo::Promise->new;  	Travel::Status::DE::DBRIS->new_p( -		journey       => $opt{trip_id}, -		with_polyline => $opt{with_polyline}, -		cache         => $self->{realtime_cache}, -		promise       => 'Mojo::Promise', -		user_agent    => $self->get_agent->request_timeout(10), +		journey        => $opt{trip_id}, +		with_polyline  => $opt{with_polyline}, +		cache          => $self->{realtime_cache}, +		promise        => 'Mojo::Promise', +		user_agent     => $self->get_agent->request_timeout(10), +		developer_mode => $self->{log}->is_level('debug') ? 1 : 0,  	)->then(  		sub {  			my ($dbris) = @_; | 
