Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Tirex : Perl version on Ubuntu 8.04 (LTS) does not support operator "//" #2789

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

Reporter: tourcyc
[Submitted to the original trac issue database at 3.25pm, Thursday, 11th March 2010]

Hi,

Tirex runs like a charm on my V-Server on Ubuntu 8.04. But
the libjson-perl package comming along with Hardy was not usable
since JSON::true and JSON::false were used but did not yet exist.
The libjson-perl source of the Intrepid (8.10) did built well
on Ubuntu Hardy such that this restriction could be solved.

For the olderly perl version "//" needed to be replaced. I don't know
whether this should go into the subversion, I don't have write permission
anyway, so here's the diff (including a typo fix):


> svn diff
Index: lib/Tirex/PrioQueue.pm
===================================================================
--- lib/Tirex/PrioQueue.pm      (revision 20439)
+++ lib/Tirex/PrioQueue.pm      (working copy)
@@ -274,7 +274,7 @
 
 Return status of the priority queue.
 
-=cut1
+=cut
 
 sub status
 {
Index: lib/Tirex/Zoomrange.pm
===================================================================
--- lib/Tirex/Zoomrange.pm      (revision 20439)
+++ lib/Tirex/Zoomrange.pm      (working copy)
@@ -41,8 +41,8 @
     my $self = bless {} => $class;
 
     $self->{'min'}  = $min;
-    $self->{'max'}  = $max // $min;
-    $self->{'name'} = $name // ('z' . $self->to_s());
+    $self->{'max'}  = $max ? $max : $min;
+    $self->{'name'} = $name ? $name :  ('z' . $self->to_s());
 
     return $self;
 }

Regards,
Andreas Huck

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 11.27pm, Friday, 12th March 2010]

I don't believe tirex bugs are being handled in trac - I suggest you contact the authors directly.

@openstreetmap-trac
Copy link
Author

Author: tourcyc
[Added to the original trac issue at 1.07am, Saturday, 13th March 2010]

Tirex is part of the applications, so I cannot see a reason why we
should not use track. Tochen Topf is one of the authors and using
this Trac, but Trac does not allow me to reasign the ticket (since
it's not mine).

@openstreetmap-trac
Copy link
Author

Author: jochen[at]topf.org
[Added to the original trac issue at 11.17am, Sunday, 14th March 2010]

I have fixed both errors in SVN. Note that your patch for the // stuff was not quite right, the query has to be for defined($max) and defined($name) to get the same behaviour as //, but in this case this might not matter.

There are several more cases in the code where the // operator is used, but they are all in the munin scripts and, if changed, would make the code a lot harder to read. So I am keeping those for the time beeing. Most people will probably has a newer perl version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant