summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-02-02 21:37:00 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-02-02 21:37:00 +0100
commit6026830d29131c8d563da66e73aca37a240b4a00 (patch)
treed54fce1e3fb3941eb626d311cf69c686cac3e9f1
parent346aa5f857d852591d5e2ef5c0ad4dba49fbae0f (diff)
StopFinder: new_p: resolve into result list
-rw-r--r--lib/Travel/Status/DE/HAFAS/StopFinder.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/StopFinder.pm b/lib/Travel/Status/DE/HAFAS/StopFinder.pm
index 9b3d232..90b61d7 100644
--- a/lib/Travel/Status/DE/HAFAS/StopFinder.pm
+++ b/lib/Travel/Status/DE/HAFAS/StopFinder.pm
@@ -114,7 +114,7 @@ sub new_p {
$self->{json} = from_json( $self->{raw_reply} );
- $promise->resolve($self);
+ $promise->resolve( $self->results );
return;
}
)->catch(
@@ -236,10 +236,10 @@ you can use an empty hashref to override it.
=item my $stopfinder_p = Travel::Status::DE::HAFAS::StopFinder->new_p(I<%opt>)
-Return a promise that resolves into a Travel::Status::DE::HAFAS::StopFinder instance
-($stopfinder) on success and rejects with an error message ($stopfinder->errstr) on
-failure. In addition to the arguments of B<new>, the following mandatory
-arguments must be set.
+Return a promise that resolves into a list of
+Travel::Status::DE::HAFAS::StopFinder results ($stopfinder->results) on success
+and rejects with an error message ($stopfinder->errstr) on failure. In addition
+to the arguments of B<new>, the following mandatory arguments must be set.
=over