Skip Menu |

This queue is for tickets about the Finance-Quote CPAN distribution.

Report information
The Basics
Id: 39658
Status: resolved
Worked: 17 min
Priority: 0/
Queue: Finance-Quote

People
Owner: eco [...] ecocode.net
Requestors: aelmahmoudy [...] users.sourceforge.net
Cc:
AdminCc:

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



Subject: Finance::Quote seems to truncate some quote prices
Date: Sun, 28 Sep 2008 16:26:08 +0200
To: bug-Finance-Quote [...] rt.cpan.org
From: أحمد المحمودي <aelmahmoudy [...] users.sourceforge.net>
Hello, When I attempt to fetch the price for XAU to EGP conversion rate using GnuCash (which uses the Finance::Quote module), I always get a value of 4, yet it's value is 4,875.7 according to: http://finance.yahoo.com/currency/convert?amt=1&from=XAU&to=EGP&submit=Convert The GnuCash developers told me that the data coming from Finance::Quote perl module is already truncated to for, please refer to: http://bugzilla.gnome.org/show_bug.cgi?id=553960 Distribution: Ubuntu 8.04.1 (Hardy) Perl version: v5.8.8 built for i486-linux-gnu-thread-multi uname -a: Linux ants 2.6.24-21-generic #1 SMP Mon Aug 25 17:32:09 UTC 2008 i686 GNU/Linux -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer SySDSoft, Inc. GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net) GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27
thanks for reporting this bug. It has been solved on the master branch in git repo. regards -- Erik
Subject: Re: [rt.cpan.org #39658] Finance::Quote seems to truncate some quote prices
Date: Mon, 29 Sep 2008 08:46:39 +0200
To: Erik Colson via RT <bug-Finance-Quote [...] rt.cpan.org>
From: aelmahmoudy [...] users.sourceforge.net
Hello, On Sun, Sep 28, 2008 at 06:31:50PM -0400, Erik Colson via RT wrote: Show quoted text
> thanks for reporting this bug. > It has been solved on the master branch in git repo.
Show quoted text
---end quoted text--- Can you send me a patch against 0.13 which fixes that bug ? Thanks... -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer SySDSoft, Inc. GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net) GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27
Subject: Re: [rt.cpan.org #39658] Finance::Quote seems to truncate some quote prices
Date: Mon, 29 Sep 2008 08:50:07 +0200
To: Erik Colson via RT <bug-Finance-Quote [...] rt.cpan.org>
From: aelmahmoudy [...] users.sourceforge.net
Sorry, I mean a patch against version 1.13.
On Mon Sep 29 02:50:19 2008, aelmahmoudy@users.sourceforge.net wrote: Show quoted text
> Sorry, I mean a patch against version 1.13.
Here it is: --- lib/Finance/Quote.pm | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/Finance/Quote.pm b/lib/Finance/Quote.pm index 2e317ef..a78858f 100644 --- a/lib/Finance/Quote.pm +++ b/lib/Finance/Quote.pm @@ -247,6 +247,9 @@ sub currency { my $row = ($te->rows())[0]; my ($exchange_rate) = $$row[1]; + $exchange_rate =~ s/,// ; # solve a bug when conversion rate + # involves thousands. yahoo inserts + # a comma when thousands occur { local $^W = 0; # Avoid undef warnings. -- Erik