Skip Menu |

This queue is for tickets about the Geo-Calc CPAN distribution.

Report information
The Basics
Id: 89293
Status: new
Priority: 0/
Queue: Geo-Calc

People
Owner: Nobody in particular
Requestors: daviddlowe.flimm [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.12
Fixed in: (no value)



Subject: Redundant condition in Geo::Calc's code
While reading Geo::Calc's code, I noticed a piece of code that is completely redundant. I've attached a patch that removes this piece of code.
Subject: Remove-confusing-code.patch
diff --git a/lib/Geo/Calc.pm b/lib/Geo/Calc.pm index db17eff..fa58026 100644 --- a/lib/Geo/Calc.pm +++ b/lib/Geo/Calc.pm @@ -377,11 +377,7 @@ of the boundry box, given the widht and height =cut method boundry_box( Num $width!, Maybe[Num] $height?, Int $precision? = -6 ) returns (HashRef[Num]) { - if( !defined( $precision ) ) { - $width *= 2; - $height = $width; - $precision = -6; - } elsif( !defined( $height ) ) { + if ( !defined( $height ) ) { $width *= 2; $height = $width; } --