<URL: https://rt.cpan.org/Ticket/Display.html?id=44245 >

Here is a patch that fixes this problem; I've tested it with yahoo and
yahoo_asia, it works, too.
diff -u --recursive libfinance-quote-perl-1.15/lib/Finance/Quote/Yahoo/Base.pm /usr/share/perl5/Finance/Quote/Yahoo/Base.pm
--- libfinance-quote-perl-1.15/lib/Finance/Quote/Yahoo/Base.pm	2008-10-26 09:15:50.000000000 +0100
+++ /usr/share/perl5/Finance/Quote/Yahoo/Base.pm	2009-03-17 16:55:52.849536735 +0100
@@ -56,11 +56,11 @@
 # in the URL.  These are recorded below, along with their corresponding
 # field names.
 
-...@fields = qw/symbol name last date time net p_change volume bid ask
+...@fields = qw/symbol name last net p_change volume bid ask
              close open day_range year_range eps pe div_date div div_yield
-	     cap ex_div avg_vol currency/;
+	     cap ex_div avg_vol currency time date/;
 
-...@field_encoding = qw/s n l1 d1 t1 c1 p2 v b a p o m w e r r1 d y j1 q a2 c4/;
+...@field_encoding = qw/s n l1 c1 p2 v b a p o m w e r r1 d y j1 q a2 c4 t1 d1/;
 
 # This returns a list of labels that are provided, so that code
 # that make use of this module can know what it's dealing with.
@@ -156,7 +156,7 @@
 
 	# The suffix is used to specify particular markets.
 	my $suffix = shift || "";
-	
+
 	my $uses_semicolon = shift || 0;
 
 	my %info;
Only in /usr/share/perl5/Finance/Quote/Yahoo/: Base.pm~
diff -u --recursive libfinance-quote-perl-1.15/lib/Finance/Quote/Yahoo/Europe.pm /usr/share/perl5/Finance/Quote/Yahoo/Europe.pm
--- libfinance-quote-perl-1.15/lib/Finance/Quote/Yahoo/Europe.pm	2008-10-26 09:15:50.000000000 +0100
+++ /usr/share/perl5/Finance/Quote/Yahoo/Europe.pm	2009-03-17 16:56:21.921029713 +0100
@@ -42,18 +42,6 @@
 
 $YAHOO_EUROPE_URL = ("http://uk.finance.yahoo.com/d/quotes.csv";);
 
-# Yahoo Europe switched date and time. sending t1d1 or d1t1
-# returns the same : Time followed by date. This is a short
-# bug fix until yahoo changes back again.
-#
-# Yahoo Europe doens't return values for r1 (div_date) and q (ex_div)
-# Another solution might be to change Base.pm FIELDS labels to this
-# string + div_date and ex_div. Code would be nicier, but this will
-# need more testing for other yahoo modules and can be done later.
-our @YH_EUROPE_FIELDS = qw/symbol name last time date net p_change volume bid ask
-                           close open day_range year_range eps pe div div_yield
-                           cap avg_vol currency/;
-
 sub methods {return (europe => \&yahoo_europe,yahoo_europe => \&yahoo_europe)};
 
 {
@@ -70,10 +58,6 @@
 	my @symbols = @_;
 	return unless @symbols;	# Nothing if no symbols.
 
-        # localise the Base.FIELDS array. Perl restores the array at
-        # the end of this sub.
-        local @Finance::Quote::Yahoo::Base::FIELDS = @YH_EUROPE_FIELDS ;
-
 	# This does all the hard work.
 	my %info = yahoo_request($quoter,$YAHOO_EUROPE_URL,\...@symbols);
 
Only in /usr/share/perl5/Finance/Quote/Yahoo/: Europe.pm~

Reply via email to