diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-31 22:39:22 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-31 22:39:47 +0100 |
commit | fd1ff5ad10e530661f59e3218dbf8ea97cfe4112 (patch) | |
tree | 23eee67b061188858a6da705a43b3a186e992400 /lib/Travel/Routing/DE/HAFAS/Location.pm |
initial commit
Diffstat (limited to 'lib/Travel/Routing/DE/HAFAS/Location.pm')
-rw-r--r-- | lib/Travel/Routing/DE/HAFAS/Location.pm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Travel/Routing/DE/HAFAS/Location.pm b/lib/Travel/Routing/DE/HAFAS/Location.pm new file mode 100644 index 0000000..170522c --- /dev/null +++ b/lib/Travel/Routing/DE/HAFAS/Location.pm @@ -0,0 +1,33 @@ +package Travel::Routing::DE::HAFAS::Location; + +use strict; +use warnings; +use 5.014; + +use parent 'Class::Accessor'; + +our $VERSION = '0.00'; + +Travel::Routing::DE::HAFAS::Location->mk_ro_accessors( + qw(lid type name eva state coordinate)); + +sub new { + my ( $obj, %opt ) = @_; + + my $loc = $opt{loc}; + + my $ref = { + lid => $loc->{lid}, + type => $loc->{type}, + name => $loc->{name}, + eva => 0 + $loc->{extId}, + state => $loc->{state}, + coordinate => $loc->{crd} + }; + + bless( $ref, $obj ); + + return $ref; +} + +1; |