Subject: | Finance::Quote::ASX |
Date: | Mon, 28 Jul 2014 11:09:53 +0800 |
To: | <bug-Finance-Quote [...] rt.cpan.org> |
From: | "Maurice Height" <mauriceh [...] bigpond.net.au> |
Finance::Quote::ASX v1.35 seems to return incorrect values in the following
program.
I am using Strawberry Perl v5.20.0 on Windows 7.
# t_Finance_Quote.pl
use 5.020;
use strict;
use warnings FATAL => 'all';
use Data::Dump;
use Finance::Quote;
$|=1;
my @codes = qw(ANZ BHP);
my $q = Finance::Quote->new;
my %info = $q->fetch("ASX",@codes);
ddx(\%info);
Output.
C:\strawberry\perl\bin\perl.exe
E:\WWW\ASX_Monitor\programs\t_Finance_Quote.pl
Process started >>>
# t_Finance_Quote.pl:12: {
# "ANZ\34bid" => "-0.24%",
# "ANZ\34currency" => "AUD",
# "ANZ\34exchange" => "Australian Stock Exchange",
# "ANZ\34high" => "33.610",
# "ANZ\34last" => "33.670",
# "ANZ\34low" => 33.695,
# "ANZ\34method" => "asx",
# "ANZ\34offer" => "33.660",
# "ANZ\34open" => "33.670",
# "ANZ\34p_change" => -0.24,
# "ANZ\34price" => "33.670",
# "ANZ\34success" => 1,
# "ANZ\34symbol" => "ANZ",
# "ANZ\34volume" => "33.530",
# "BHP\34bid" => "-0.08%",
# "BHP\34currency" => "AUD",
# "BHP\34exchange" => "Australian Stock Exchange",
# "BHP\34high" => "38.830",
# "BHP\34last" => "38.970",
# "BHP\34low" => "39.040",
# "BHP\34method" => "asx",
# "BHP\34offer" => "38.970",
# "BHP\34open" => "38.980",
# "BHP\34p_change" => -0.08,
# "BHP\34price" => "38.970",
# "BHP\34success" => 1,
# "BHP\34symbol" => "BHP",
# "BHP\34volume" => "38.740",
# }
<<< Process finished. (Exit code 0)
At line 120 in module Finance::Quote::ASX, each $row does not contain data
in the order it is processed.
I think the next item after 'p_change' is missing - it appears to be
"percentage change in price".
120 foreach my $label (qw/last p_change bid offer open
high low volume/) {
Thanks
Maurice Height