summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-23 16:47:12 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-23 16:47:12 +0200
commit13b9dcdf70eb95c74e8971122bbe5b268b81bd50 (patch)
treeb629e31d47d06e35427f266a5f9b33cb69c086b1
parent2a1d17f8d50aacd9de082139e76c55ee40199a15 (diff)
Rename to Travel::Routing::DE::VRR
-rw-r--r--Build.PL2
-rw-r--r--lib/Travel/Routing/DE/VRR.pm (renamed from lib/Net/Travel/DE/VRR.pm)22
-rw-r--r--lib/Travel/Routing/DE/VRR/Route.pm (renamed from lib/Net/Travel/DE/VRR/Route.pm)24
-rw-r--r--lib/Travel/Routing/DE/VRR/Route/Part.pm (renamed from lib/Net/Travel/DE/VRR/Route/Part.pm)16
-rw-r--r--t/20-vrr.t6
5 files changed, 35 insertions, 35 deletions
diff --git a/Build.PL b/Build.PL
index dfb4a93..827db39 100644
--- a/Build.PL
+++ b/Build.PL
@@ -11,7 +11,7 @@ my %opts = (
'Test::Pod' => 0,
'Test::Command' => 0,
},
- module_name => 'Net::Travel::DE::VRR',
+ module_name => 'Travel::Routing::DE::VRR',
license => 'unrestricted',
requires => {
'Class::Accessor' => 0,
diff --git a/lib/Net/Travel/DE/VRR.pm b/lib/Travel/Routing/DE/VRR.pm
index 9a20760..c73d033 100644
--- a/lib/Net/Travel/DE/VRR.pm
+++ b/lib/Travel/Routing/DE/VRR.pm
@@ -1,11 +1,11 @@
-package Net::Travel::DE::VRR;
+package Travel::Routing::DE::VRR;
use strict;
use warnings;
use 5.010;
use Carp qw(confess);
-use Net::Travel::DE::VRR::Route;
+use Travel::Routing::DE::VRR::Route;
use LWP::UserAgent;
use XML::LibXML;
@@ -421,7 +421,7 @@ sub parse_pretty {
push( @elements, $hash );
}
- return Net::Travel::DE::VRR::Route->new(@elements);
+ return Travel::Routing::DE::VRR::Route->new(@elements);
}
sub new {
@@ -531,13 +531,13 @@ __END__
=head1 NAME
-Net::Travel::DE::VRR - inofficial interface to the efa.vrr.de German itinerary service
+Travel::Routing::DE::VRR - inofficial interface to the efa.vrr.de German itinerary service
=head1 SYNOPSIS
- use Net::Travel::DE::VRR;
+ use Travel::Routing::DE::VRR;
- my $efa = Net::Travel::DE::VRR->new(
+ my $efa = Travel::Routing::DE::VRR->new(
origin => [ 'Essen', 'HBf' ],
destination => [ 'Duisburg', 'HBf' ],
);
@@ -562,7 +562,7 @@ version 1.3
=head1 DESCRIPTION
-B<Net::Travel::DE::VRR> is a client for the efa.vrr.de web interface.
+B<Travel::Routing::DE::VRR> is a client for the efa.vrr.de web interface.
You pass it the start/stop of your journey, maybe a time and a date and more
details, and it returns the up-to-date scheduled connections between those two
stops.
@@ -573,9 +573,9 @@ It uses B<LWP::USerAgent> and B<XML::LibXML> for this.
=over
-=item $efa = Net::Travel::DE::VRR->new(I<%conf>)
+=item $efa = Travel::Routing::DE::VRR->new(I<%conf>)
-Returns a new Net::Travel::DE::VRR object and sets up its POST data via %conf.
+Returns a new Travel::Routing::DE::VRR object and sets up its POST data via %conf.
Valid hash keys and their values are:
@@ -650,7 +650,7 @@ I<%opts> is passed on to C<< LWP::UserAgent->new(%opts) >>.
=item $efa->routes()
-Returns a list of Net::Travel::DE::VRR::Route(3pm) elements. Each one contains
+Returns a list of Travel::Routing::DE::VRR::Route(3pm) elements. Each one contains
one method of getting from start to stop.
=back
@@ -701,7 +701,7 @@ Dies with a backtrace when anything goes wrong.
The parser is still somewhat fragile and has no proper error handling.
-It is best not to pass Unicode characters to B<Net::Travel::DE::VRR>.
+It is best not to pass Unicode characters to B<Travel::Routing::DE::VRR>.
=head1 AUTHOR
diff --git a/lib/Net/Travel/DE/VRR/Route.pm b/lib/Travel/Routing/DE/VRR/Route.pm
index 7089120..c250be7 100644
--- a/lib/Net/Travel/DE/VRR/Route.pm
+++ b/lib/Travel/Routing/DE/VRR/Route.pm
@@ -1,10 +1,10 @@
-package Net::Travel::DE::VRR::Route;
+package Travel::Routing::DE::VRR::Route;
use strict;
use warnings;
use 5.010;
-use Net::Travel::DE::VRR::Route::Part;
+use Travel::Routing::DE::VRR::Route::Part;
our $VERSION = '1.3';
@@ -16,7 +16,7 @@ sub new {
for my $part (@parts) {
push(
@{ $ref->{parts} },
- Net::Travel::DE::VRR::Route::Part->new( %{$part} )
+ Travel::Routing::DE::VRR::Route::Part->new( %{$part} )
);
}
@@ -35,13 +35,13 @@ __END__
=head1 NAME
-Net::Travel::DE::VRR::Route - Single route (connection) between two points
+Travel::Routing::DE::VRR::Route - Single route (connection) between two points
=head1 SYNOPSIS
for my $route ( $efa->routes() ) {
for my $part ( $route->parts() ) {
- # $part is a Net::Travel::DE::VRR::Route::Part object
+ # $part is a Travel::Routing::DE::VRR::Route::Part object
}
}
@@ -51,8 +51,8 @@ version 1.3
=head1 DESCRIPTION
-Net::Travel::DE::VRR::Route describes a single method of getting from one
-point to another. It holds a bunch of Net::Travel::DE::VRR::Route::Part(3pm)
+Travel::Routing::DE::VRR::Route describes a single method of getting from one
+point to another. It holds a bunch of Travel::Routing::DE::VRR::Route::Part(3pm)
objects describing the parts of the route in detail. Each part depends on the
previous one.
@@ -62,14 +62,14 @@ You usually want to acces it via C<< $efa->routes() >>.
=over
-=item my $route = Net::Travel::DE::VRR::Route->new(I<@parts>)
+=item my $route = Travel::Routing::DE::VRR::Route->new(I<@parts>)
-Creates a new Net::Travel::DE::VRR::Route elements consisting of I<parts>,
-which are Net::Travel::DE::VRR::Route::Part elements.
+Creates a new Travel::Routing::DE::VRR::Route elements consisting of I<parts>,
+which are Travel::Routing::DE::VRR::Route::Part elements.
=item $route->parts()
-Returns a list of Net::Travel::DE::VRR::Route::Part(3pm) elements describing
+Returns a list of Travel::Routing::DE::VRR::Route::Part(3pm) elements describing
the actual route.
=back
@@ -88,7 +88,7 @@ None known.
=head1 SEE ALSO
-Net::Travel::DE::VRR(3pm), Net::Travel::DE::VRR::Route::Part(3pm).
+Travel::Routing::DE::VRR(3pm), Travel::Routing::DE::VRR::Route::Part(3pm).
=head1 AUTHOR
diff --git a/lib/Net/Travel/DE/VRR/Route/Part.pm b/lib/Travel/Routing/DE/VRR/Route/Part.pm
index a85e96c..e47a512 100644
--- a/lib/Net/Travel/DE/VRR/Route/Part.pm
+++ b/lib/Travel/Routing/DE/VRR/Route/Part.pm
@@ -1,4 +1,4 @@
-package Net::Travel::DE::VRR::Route::Part;
+package Travel::Routing::DE::VRR::Route::Part;
use strict;
use warnings;
@@ -8,7 +8,7 @@ use parent 'Class::Accessor';
our $VERSION = '1.3';
-Net::Travel::DE::VRR::Route::Part->mk_ro_accessors(
+Travel::Routing::DE::VRR::Route::Part->mk_ro_accessors(
qw(arrival_stop arrival_time departure_stop departure_time train_line
train_destination)
);
@@ -33,7 +33,7 @@ __END__
=head1 NAME
-Net::Travel::DE::VRR::Route::Part - Describes one connection between two
+Travel::Routing::DE::VRR::Route::Part - Describes one connection between two
points, without interchanges
=head1 SYNOPSIS
@@ -58,20 +58,20 @@ version 0.3
=head1 DESCRIPTION
-B<Net::Travel::DE::VRR::Route::Part> holds one specific connection (without
+B<Travel::Routing::DE::VRR::Route::Part> holds one specific connection (without
interchanges) between two points. It specifies the start/stop point and time,
the train line and its destination, and optional additional data.
-It is usually obtained by a call to Net::Travel::DE::VRR::Route(3pm)'s
+It is usually obtained by a call to Travel::Routing::DE::VRR::Route(3pm)'s
B<parts> method.
=head1 METHODS
=over
-=item $part = Net::Travel::DE::VRR::Route::Part->new(I<%data>)
+=item $part = Travel::Routing::DE::VRR::Route::Part->new(I<%data>)
-Creates a new Net::Travel::DE::VRR::Route::Part object. I<data> consists of:
+Creates a new Travel::Routing::DE::VRR::Route::Part object. I<data> consists of:
=over
@@ -139,7 +139,7 @@ None known.
=head1 SEE ALSO
-Net::Travel::DE::VRR(3pm).
+Travel::Routing::DE::VRR(3pm).
=head1 AUTHOR
diff --git a/t/20-vrr.t b/t/20-vrr.t
index 96a8c69..c97b376 100644
--- a/t/20-vrr.t
+++ b/t/20-vrr.t
@@ -6,9 +6,9 @@ use 5.010;
use Test::More tests => 59;
BEGIN {
- use_ok('Net::Travel::DE::VRR');
+ use_ok('Travel::Routing::DE::VRR');
}
-require_ok('Net::Travel::DE::VRR');
+require_ok('Travel::Routing::DE::VRR');
sub efa_conf {
my $ret = {
@@ -23,7 +23,7 @@ sub efa_conf {
sub efa_new {
return new_ok(
- 'Net::Travel::DE::VRR' => [%{efa_conf(@_)}]
+ 'Travel::Routing::DE::VRR' => [%{efa_conf(@_)}]
);
}