Subject: | Bug in IndiaMutual.pm in Finance-Quote 1.18 and its fix |
Date: | Mon, 11 Mar 2013 02:59:14 +0800 (SGT) |
To: | "bug-Finance-Quote [...] rt.cpan.org" <bug-Finance-Quote [...] rt.cpan.org> |
From: | Prasanth V R <prasanthvr [...] yahoo.com> |
Hi all,
IndiaMutual.pm in Finance::Quote 1.18 doesn't work - the data format has changed. The following patch fixes it:
--- IndiaMutual.pm 2013-03-11 00:21:58.565689187 +0530
+++ IndiaMutual.my.pm 2013-03-11 00:22:48.411519743 +0530
@@ -89,11 +89,11 @@
my $data = $allquotes{$symbol};
if ($data) {
- $fundquote{$symbol, "name"} = $data->[4];
- $fundquote{$symbol, "nav"} = $data->[5];
- $fundquote{$symbol, "rprice"} = $data->[6];
- $fundquote{$symbol, "sprice"} = $data->[7];
- $quoter->store_date(\%fundquote, $symbol, {eurodate => $data->[8]});
+ $fundquote{$symbol, "name"} = $data->[2];
+ $fundquote{$symbol, "nav"} = $data->[3];
+ $fundquote{$symbol, "rprice"} = $data->[4];
+ $fundquote{$symbol, "sprice"} = $data->[5];
+ $quoter->store_date(\%fundquote, $symbol, {eurodate => $data->[6]});
$fundquote{$symbol, "success"} = 1;
} else {
$fundquote{$symbol, "success"} = 0;
This is also attached as a patch. Hope this helps,
Thanks and regards,
Prasanth Regy
Message body is not shown because sender requested not to inline it.