[Tilesathome] Black tile on inkscape < 0.46 and renderstripes at default
Dirk-Lüder Kreie
osm-list at deelkar.net
Thu Oct 23 18:00:25 BST 2008
Dirk Stöcker schrieb:
> 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 :-)
That's what you get for bugfixing in half a ton of sh scripts, before
switching to perl, where it's the other way around.
--
Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0952°N 8.8652°E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20081023/24b6e3d4/attachment.pgp>
More information about the Tilesathome
mailing list