Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Travel-Status-DE-HAFAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
Travel-Status-DE-HAFAS
Commits
1608d648
Commit
1608d648
authored
9 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
result->info: return undef if no info is available
parent
476ecf88
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Changelog
+2
-0
2 additions, 0 deletions
Changelog
lib/Travel/Status/DE/HAFAS.pm
+1
-3
1 addition, 3 deletions
lib/Travel/Status/DE/HAFAS.pm
lib/Travel/Status/DE/HAFAS/Result.pm
+2
-2
2 additions, 2 deletions
lib/Travel/Status/DE/HAFAS/Result.pm
with
5 additions
and
5 deletions
Changelog
+
2
−
0
View file @
1608d648
...
...
@@ -24,6 +24,8 @@ git HEAD
* Result: Remove route, route_raw, route_info, route_interesting and
route_timetable accessors
* Result: Add is_changed_platform and messages accessors
* Result->info is now undef instead of an empty string when no information
is available
Travel::Status::DE::DeutscheBahn 1.05 - Thu May 14 2015
...
...
This diff is collapsed.
Click to expand it.
lib/Travel/Status/DE/HAFAS.pm
+
1
−
3
View file @
1608d648
...
...
@@ -305,11 +305,9 @@ sub results {
substr
(
$date
,
6
,
0
,
'
20
'
);
$info
//
=
q{}
;
# delayReason=" " means no delay reason
if
(
$info
eq
q{ }
)
{
$info
=
q{}
;
$info
=
undef
;
}
$train
=~
s{#.*$}{}
;
...
...
This diff is collapsed.
Click to expand it.
lib/Travel/Status/DE/HAFAS/Result.pm
+
2
−
2
View file @
1608d648
...
...
@@ -11,7 +11,7 @@ use parent 'Class::Accessor';
our
$VERSION
=
'
1.05
';
Travel::Status::DE::HAFAS::
Result
->
mk_ro_accessors
(
qw(date info raw_e_delay raw_delay time train route_end
info_raw
)
);
qw(date info raw_e_delay raw_delay time train route_end)
);
sub
new
{
my
(
$obj
,
%conf
)
=
@_
;
...
...
@@ -169,7 +169,7 @@ Also returns undef if the arrival/departure has been cancelled.
=item $result->info
Returns additional information, for instance the most recent delay reason.
Returns an empty string
if no (useful) information is available.
undef
if no (useful) information is available.
=item $result->is_cancelled
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment