Commit 826ec4a8 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Minor code style adjustment (no parens after accessors)

parent 13256020
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -185,12 +185,12 @@ $efa = eval {

check_for_error($@);

my @routes = $efa->routes();
my @routes = $efa->routes;

for my $i ( 0 .. $#routes ) {
	for my $c ( $routes[$i]->parts() ) {
	for my $c ( $routes[$i]->parts ) {

		for my $extra ( $c->extra() ) {
		for my $extra ( $c->extra ) {

			if ( not( length $ignore_info and $extra =~ /$ignore_info/i ) ) {
				say "# $extra";
+6 −6
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ sub parse_initial {
		}

		if ( $colspan == 8 ) {
			if ( $td->textContent() =~ m{ (?<no> \d+ ) [.] .+ Fahrt }x ) {
			if ( $td->textContent =~ m{ (?<no> \d+ ) [.] .+ Fahrt }x ) {
				$con_no   = $+{no} - 1;
				$con_part = 0;
				next;
@@ -415,9 +415,9 @@ sub parse_initial {

		if (    defined $con_no
			and not $td->exists($xp_img)
			and $td->textContent() !~ /^\s*$/ )
			and $td->textContent !~ /^\s*$/ )
		{
			push( @{ $cons->[$con_no]->[$con_part] }, $td->textContent() );
			push( @{ $cons->[$con_no]->[$con_part] }, $td->textContent );
		}
	}

@@ -530,7 +530,7 @@ sub submit {
sub parse {
	my ($self) = @_;

	my $raw_cons = $self->parse_initial();
	my $raw_cons = $self->parse_initial;

	for my $raw_con ( @{$raw_cons} ) {
		push( @{ $self->{routes} }, $self->parse_pretty($raw_con) );
@@ -559,7 +559,7 @@ sub check_ambiguous {
		my @possible;

		foreach my $val ( $select->findnodes($xp_option) ) {
			push( @possible, $val->textContent() );
			push( @possible, $val->textContent );
		}
		my $err_text = join( q{, }, @possible );

@@ -582,7 +582,7 @@ sub check_no_connections {
	my $err_node = $tree->findnodes($xp_err_img)->[0];

	if ($err_node) {
		my $text = $err_node->parentNode()->parentNode()->textContent();
		my $text = $err_node->parentNode->parentNode->textContent;
		Travel::Routing::DE::VRR::Exception::NoConnections->throw(
			error => $text, );
	}
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ 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.

You usually want to acces it via C<< $efa->routes() >>.
You usually want to acces it via C<< $efa->routes >>.

=head1 METHODS

@@ -67,7 +67,7 @@ You usually want to acces it via C<< $efa->routes() >>.
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()
=item $route->parts

Returns a list of Travel::Routing::DE::VRR::Route::Part(3pm) elements describing
the actual route.