Skip Menu |

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 98185
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: lkundrak [...] v3.sk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.999705



CC: Lubomir Rintel <lkundrak [...] v3.sk>
Subject: [PATCH] Avoid using my() in a condition
Date: Tue, 19 Aug 2014 22:30:08 +0200
To: bug-math-bigint [...] rt.cpan.org
From: Lubomir Rintel <lkundrak [...] v3.sk>
Due to an old bug, using my in a false conditional results in an accidental creation of a state (or "static" variable). See "Deprecated use of my() in false conditional" in perldiag(1). Unfortunately, due to another bug in interpreter, the warning fails to trigger if there's an assignment in variable declaration. This change removes a condition (which is useless anyway) to avoid the noise once the second bug is fixed and the warning triggers properly. --- lib/Math/BigFloat.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm index 28b18c1..07493cd 100755 --- a/lib/Math/BigFloat.pm +++ b/lib/Math/BigFloat.pm @@ -1263,7 +1263,7 @@ sub _log $over->bmul($u); $factor = $self->new(3); $f = $self->new(2); - my $steps = 0 if DEBUG; + my $steps = 0; $limit = $self->new("1E-". ($scale-1)); while (3 < 5) { -- 2.0.4