[Tilesathome] Black tile on inkscape < 0.46 and renderstripes at default

Dirk Stöcker openstreetmap at dstoecker.de
Thu Oct 23 14:06:37 BST 2008


On Thu, 23 Oct 2008, Dirk-Lüder Kreie wrote:

> This would then verify the RegEx is at least correct for windows as well.

The RegExp is ok, but not your code.

--- lib/TahConf.pm      (Revision 11424)
+++ lib/TahConf.pm      (Arbeitskopie)
@@ -326,7 +326,7 @@
          my $InkscapeV=`\"$cmd\" -V 2>&1`;
          $InkscapeV =~ /Inkscape.(\d+(\.\d+)+)/;
          my $minVersion = "0.46";
-        if ( $InkscapeV == '' )
+        if (!$InkscapeV)
          {
              print "* Could not determine your inkscape version\n";
              print "* You need at least version ${minVersion} for RenderStripes=0 setting\n" unless $self->get("RenderStripes");

--> Never compare against "", undef or 0 in Perl, thats a bad idea. You do 
a integer compare here and "0.46" and "" are both 0 and thus both equal 
all the time :-)

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)


More information about the Tilesathome mailing list