--- libfinance-quote-perl-1.16.orig/debian/docs +++ libfinance-quote-perl-1.16/debian/docs @@ -0,0 +1,3 @@ +Documentation/FAQ +Documentation/Hackers-Guide +Documentation/README --- libfinance-quote-perl-1.16.orig/debian/examples +++ libfinance-quote-perl-1.16/debian/examples @@ -0,0 +1,4 @@ +Examples/stockdump.pl +Examples/chkshares.pl +Examples/Quote_example.pl +Examples/currency-lookup.pl --- libfinance-quote-perl-1.16.orig/debian/changelog +++ libfinance-quote-perl-1.16/debian/changelog @@ -0,0 +1,141 @@ +libfinance-quote-perl (1.16-4) unstable; urgency=low + + * debian/patches/09_currency.diff: Added. Closes: #528844. Fixes problem + with currency exchange rates. + + -- Bart Martens Thu, 10 Sep 2009 17:24:04 +0200 + +libfinance-quote-perl (1.16-3) unstable; urgency=low + + * debian/patches/08_deka.diff: Added. Closes: #539052. + Patch by Daniel Bayer , thanks. + + -- Bart Martens Wed, 29 Jul 2009 11:10:43 +0200 + +libfinance-quote-perl (1.16-2) unstable; urgency=low + + * debian/patches/07_encoding.diff: Disabled. Closes: #531788. + + -- Bart Martens Sun, 07 Jun 2009 11:47:26 +0200 + +libfinance-quote-perl (1.16-1) unstable; urgency=low + + * New upstream release. + * debian/copyright: Updated. + + -- Bart Martens Sun, 10 May 2009 19:27:38 +0200 + +libfinance-quote-perl (1.15-1) unstable; urgency=low + + * New upstream release. + * debian/patches/03_whatis.diff: Updated. + * debian/patches/05_yahoo_e.diff: Disabled. + + -- Bart Martens Mon, 09 Mar 2009 17:05:57 +0100 + +libfinance-quote-perl (1.13-4) unstable; urgency=low + + * debian/patches/07_encoding.diff: Added. Closes: #490395. + + -- Bart Martens Wed, 27 Aug 2008 19:21:21 +0200 + +libfinance-quote-perl (1.13-3) unstable; urgency=low + + * debian/patches/05_yahoo_e.diff: Added. Closes: #478576. + * debian/patches/06_seb.diff: Added. Fixes broken link. + + -- Bart Martens Sun, 29 Jun 2008 16:58:41 +0200 + +libfinance-quote-perl (1.13-2) unstable; urgency=low + + * debian/control: Updated Standards-Version, Homepage, and my e-mail. + * Fixed debian-copyright-file-uses-obsolete-national-encoding. + * debian/patches/03_whatis.diff: Added. Fixes manpage-has-bad-whatis-entry. + * debian/patches/04_deka.diff: Added. Closes: #431293. + * debian/rules: Added some testcoding. + + -- Bart Martens Sun, 03 Feb 2008 13:38:01 +0100 + +libfinance-quote-perl (1.13-1) unstable; urgency=low + + * New upstream release. Closes: #412259. + * debian/patches/Deka.pm.diff: Removed obsolete patch. + * debian/patches/02_typo.diff: Added. Closes: #409358. + + -- Bart Martens Sat, 14 Apr 2007 18:40:49 +0200 + +libfinance-quote-perl (1.12-2) unstable; urgency=low + + * debian/control: Added libcrypt-ssleay-perl to Depends. + * debian/patches/Deka.pm.diff: Changes needed for changed DekaBank website. + Closes: #400674. Patch by Vincent Smeets , thanks. + + -- Bart Martens Tue, 28 Nov 2006 07:57:20 +0100 + +libfinance-quote-perl (1.12-1) unstable; urgency=low + + * New maintainer. Closes: #398116. + * Acknowledge NMU. Closes: #320815, #322819, #350093. + * New upstream release. Closes: #382910, #342843. + * debian/*: Repackaged with cdbs. + * debian/copyright: Updated. + * debian/lintian/libfinance-quote-perl: Lintian override for long URL in + Finance::Quote::SEB.3pm. + * debian/watch: Added. + + -- Bart Martens Sun, 12 Nov 2006 12:40:36 +0100 + +libfinance-quote-perl (1.11-0.1) unstable; urgency=low + + * Non Maintainer Upload. + * New upstream release (closes: #320815) + * Remove /usr/doc (closes: #322819) + * Move binary indep files to /usr/share (closes: #350093) + * Attempt to run the tests on build (even though they aren't actually + run currently because upstream has disabled them.) + * Upgrade the Standards version to 3.6.2; changes above required. + + -- Don Armstrong Sun, 19 Feb 2006 15:22:40 -0800 + +libfinance-quote-perl (1.08-1) unstable; urgency=low + + * Version update (closes: Bug#115559) + * It also (closes: Bug#181359) + + -- Ross Peachey Fri, 13 Jul 2003 15:13:12 +1000 + +libfinance-quote-perl (1.07-2) stable testing unstable; urgency=low + + * Added dependency on libwww-perl (closes: Bug#171058) + + -- Ross Peachey Fri, 27 Dec 2002 09:02:40 +1000 + +libfinance-quote-perl (1.07-1) unstable; urgency=low + + * Version update (closes: Bug#147511) + + -- Ross Peachey Mon, 15 Jul 2002 18:48:36 +1000 + +libfinance-quote-perl (1.06-2) unstable; urgency=low + + * Remove spurious dependancy (closes: Bug#118649) + + -- Ross Peachey Sun, 11 Nov 2001 18:48:36 +1100 + +libfinance-quote-perl (1.06-1) unstable; urgency=low + + * Version update. + + -- Ross Peachey Tue, 03 Jul 2001 21:14:12 +1000 + +libfinance-quote-perl (1.05-1) unstable; urgency=low + + * Initial Debian release. + + -- Ross Peachey Wed, 14 Feb 2001 15:24:49 +1100 + +Local variables: +mode: debian-changelog +user-mail-address: "rcp@debian.org" +End: + --- libfinance-quote-perl-1.16.orig/debian/control +++ libfinance-quote-perl-1.16/debian/control @@ -0,0 +1,14 @@ +Source: libfinance-quote-perl +Section: perl +Priority: optional +Maintainer: Bart Martens +Build-Depends: cdbs, debhelper (>= 5), libhtml-tableextract-perl, libwww-perl +Standards-Version: 3.8.3 +Homepage: http://finance-quote.sourceforge.net/ + +Package: libfinance-quote-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libhtml-tableextract-perl, libwww-perl, libcrypt-ssleay-perl +Description: Perl module for retrieving stock quotes from a variety of sources + This is a Perl module that retrieves stock quotes and other securities + information from various locations --- libfinance-quote-perl-1.16.orig/debian/compat +++ libfinance-quote-perl-1.16/debian/compat @@ -0,0 +1 @@ +5 --- libfinance-quote-perl-1.16.orig/debian/install +++ libfinance-quote-perl-1.16/debian/install @@ -0,0 +1 @@ +debian/lintian/libfinance-quote-perl usr/share/lintian/overrides/ --- libfinance-quote-perl-1.16.orig/debian/rules +++ libfinance-quote-perl-1.16/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/perlmodule.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +# DEB_MAKE_ENVVARS += ONLINE_TEST=yes +# +# update-config:: +# [ -d test ] || mkdir test +# mv t/*.t test +# mv test/yahoo*.t t +# +# reverse-config:: +# if [ -d test ] ; then \ +# mv test/*.t t ; \ +# rmdir test ; \ +# fi --- libfinance-quote-perl-1.16.orig/debian/copyright +++ libfinance-quote-perl-1.16/debian/copyright @@ -0,0 +1,82 @@ +This is Debian GNU/Linux's prepackaged version of Finance::Quote. This +is a set of perl modules which provide access to securities prices. + +This package was put together by Ross Peachey , from +the original sources, available from: + + http://sourceforge.net/projects/finance-quote/ + +The library is also available from the Comprehensive Perl Archive +Network (CPAN). Visit to find a CPAN +site near you. + +Copyright 1998, Dj Padzensky +Copyright 1998, 1999 Linas Vepstas +Copyright 2000, Yannick LE NY (update for Yahoo Europe and YahooQuote) +Copyright 2000-2001, Paul Fenwick (updates for ASX, maintenance and release) +Copyright 2000-2001, Brent Neal (update for TIAA-CREF) +Copyright 2000 Volker Stuerzl (DWS and VWD support) +Copyright 2000 Keith Refson (Trustnet support) +Copyright 2001 Rob Sessink (AEX support) +Copyright 2001 Leigh Wedding (ASX updates) +Copyright 2001 Tobias Vancura (Fool support) +Copyright 2001 James Treacy (TD Waterhouse support) +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +Copyright (C) 1998, 1999 Linas Vepstas +Copyright (C) 1998, Dj Padzensky +Copyright (C) 2000-2004, Paul Fenwick +Copyright (C) 2000-2001, Brent Neal +Copyright (C) 2000, Keith Refson +Copyright (C) 2000, Volker Stuerzl +Copyright (C) 2000, Yannick LE NY +Copyright (C) 2001, James Treacy +Copyright (C) 2001, Leigh Wedding +Copyright (C) 2001, M.R.Muthu Kumar +Copyright (C) 2001, Rob Sessink +Copyright (C) 2001, Tobias Vancura +Copyright (C) 2002, Rainer Dorsch +Copyright (C) 2003,2005,2006 Jörg Sommer +Copyright (C) 2003, Ian Dall +Copyright (C) 2003, Pawel Konieczny +Copyright (C) 2003, Rob Clark +Copyright (C) 2003, Tomas Carlsson +Copyright (C) 2004, Frank Mori Hess +Copyright (C) 2004, Johan van Oostrum +Copyright (C) 2004, Michael Curtis +Copyright (C) 2005 Knut Franke +Copyright (C) 2005, Morten Cools +Copyright (C) 2006, Dominique Corbex +Copyright (C) 2006, Klaus Dahlke +Copyright (C) 2006, Mika Laari +Copyright (C) 2008, Stephan Ebelt +Copyright (C) 2008, Bernard Fuentes +Copyright (C) 2008-2009 Adam Kennedy +Copyright (C) 2009, Herman van Rink +Copyright (C) 2008-2009, Erik Colson +Copyright (C) 2009, Bradley Dean + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is + Copyright (C) 2001-2003 Ross Peachey + Copyright (C) 2006 Don Armstrong + Copyright (C) 2006-2009 Bart Martens +and is licensed under the GPL version 2, see above. + --- libfinance-quote-perl-1.16.orig/debian/watch +++ libfinance-quote-perl-1.16/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/finance-quote/Finance-Quote-(.*)\.tar\.gz --- libfinance-quote-perl-1.16.orig/debian/lintian/libfinance-quote-perl +++ libfinance-quote-perl-1.16/debian/lintian/libfinance-quote-perl @@ -0,0 +1 @@ +libfinance-quote-perl: manpage-has-errors-from-man usr/share/man/man3/Finance::Quote::SEB.3pm.gz 159: warning [p 1, 4.2i]: can't break line --- libfinance-quote-perl-1.16.orig/debian/patches/04_deka.diff +++ libfinance-quote-perl-1.16/debian/patches/04_deka.diff @@ -0,0 +1,55 @@ +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/Deka.pm 2007-01-01 00:20:55.000000000 +0100 ++++ lib/Finance/Quote/Deka.pm 2008-02-03 17:24:07.000000000 +0100 +@@ -62,8 +62,7 @@ + if (!$response -> is_success()) { + $info{$stock,"errormsg"} = "HTTP failure"; + } else { +- my @headers = [qw(Name ISIN Whg Datum)]; +- my $te = new HTML::TableExtract(headers => @headers, slice_columns => 0); ++ my $te = new HTML::TableExtract(); + $te->parse($response->content); + foreach my $ts ($te->table_states) { + # foreach my $row ($ts->rows) { +@@ -73,16 +72,34 @@ + + foreach my $row ($ts->rows) { + next if !defined $$row[0] || !defined $$row[1]; +- $info{$stock,"name"} = $$row[0]; +- $info{$stock,"currency"} = $$row[2]; +- $quoter->store_date(\%info, $stock, {eurodate => $$row[6]}); +- $info{$stock,"price"} = convert_price(trim($$row[4])); +- $info{$stock,"last"} = $info{$stock,"price"}; +- $info{$stock,"success"} = 1; +- $info{$stock,"method"} = "deka"; +- $info{$stock,"symbol"} = $stock; ++ next if !defined $$row[2] || !defined $$row[3]; ++ $info{$stock,"currency"} = $$row[1] if( $$row[0] =~ /^W.hrung:$/ ); ++ $info{$stock,"price"} = convert_price(trim($$row[3])) if( $$row[2] eq "Anteilpreis Aktuell:" ); + } + } ++ ++ $info{$stock,"name"} = $1 ++ if( $response->content =~ /
[^<>]*

([^<>]+)<\/h1>/s ); ++ $info{$stock,"eurodate"} = $1 ++ if( $response->content =~ /
[^<>]*

Aktuelle Fondsdaten vom ([^<>]+)<\/h2>/s ); ++ $info{$stock,"last"} = $info{$stock,"price"} ++ if( defined $info{$stock,"price"} ); ++ ++ $info{$stock,"success"} = 1 ++ if( defined $info{$stock,"name"} ++ && defined $info{$stock,"eurodate"} ++ && defined $info{$stock,"price"} ++ && defined $info{$stock,"last"} ++ && defined $info{$stock,"currency"} ); ++ ++ if( $info{$stock,"success"} == 1 ) ++ { ++ $info{$stock,"method"} = "deka"; ++ $info{$stock,"symbol"} = $stock; ++ $quoter->store_date(\%info, $stock, {eurodate => $info{$stock,"eurodate"}}); ++ delete $info{$stock,"eurodate"}; ++ } ++ + $info{$stock,"errormsg"} = "Couldn't parse deka website" + if ($info{$stock,"success"} == 0); + } --- libfinance-quote-perl-1.16.orig/debian/patches/08_deka.diff +++ libfinance-quote-perl-1.16/debian/patches/08_deka.diff @@ -0,0 +1,14 @@ +Patch by Daniel Bayer +Closes: #539052 + +--- lib/Finance/Quote/Deka.pm.orig 2009-07-29 11:16:07.000000000 +0200 ++++ lib/Finance/Quote/Deka.pm 2009-07-29 11:18:12.000000000 +0200 +@@ -81,7 +81,7 @@ + $info{$stock,"name"} = $1 + if( $response->content =~ /
[^<>]*

([^<>]+)<\/h1>/s ); + $info{$stock,"eurodate"} = $1 +- if( $response->content =~ /
[^<>]*

Aktuelle Fondsdaten vom ([^<>]+)<\/h2>/s ); ++ if( $response->content =~ /

Aktuelle Fondsdaten vom ([^<>]+)<\/h2>/s ); + $info{$stock,"last"} = $info{$stock,"price"} + if( defined $info{$stock,"price"} ); + --- libfinance-quote-perl-1.16.orig/debian/patches/06_seb.diff +++ libfinance-quote-perl-1.16/debian/patches/06_seb.diff @@ -0,0 +1,11 @@ +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/SEB.pm 2005-03-20 02:44:13.000000000 +0100 ++++ lib/Finance/Quote/SEB.pm 2008-06-29 17:34:01.000000000 +0200 +@@ -119,7 +119,7 @@ + Therefore the complete fund name must be given, including spaces, case + is important. + +-Consult http://taz.vv.sebank.se/cgi-bin/pts3/pow/Fonder/kurser/kurslista_body.asp ++Consult http://www.seb.se/ + for all available funds. + + Example "SEB Aktiesparfond" --- libfinance-quote-perl-1.16.orig/debian/patches/05_yahoo_e.diff.DISABLED +++ libfinance-quote-perl-1.16/debian/patches/05_yahoo_e.diff.DISABLED @@ -0,0 +1,132 @@ +--- orig/lib/Finance/Quote/Yahoo/Base.pm 2007-12-16 12:27:13.000000000 +0000 ++++ lib/Finance/Quote/Yahoo/Base.pm 2008-03-08 16:02:04.000000000 +0000 +@@ -56,7 +56,7 @@ + # 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 time date 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/; + +@@ -142,7 +142,7 @@ + # yahoo_request (restricted function) + # + # This function expects a Finance::Quote object, a base URL to use, +-# a refernece to a list of symbols to lookup. If a fourth argument is ++# a reference to a list of symbols to lookup. If a fourth argument is + # used then it will act as a suffix that needs to be appended to the stocks + # in order to obtain the correct information. This function relies upon + # the fact that the various Yahoo's all work the same way. +@@ -189,12 +189,21 @@ + @q = $quoter->parse_csv($_); + } + my $symbol = $q[0]; ++ $symbol =~ s/GBP$/.L/; + my ($exchange) = $symbol =~ m/\.([A-Z]+)/; + + # Strip out suffixes. Mmmm, functions as lvalues. + substr($symbol,-length($suffix),length($suffix)) = ""; + +- # If we weren't using a two dimesonal ++ # Some Yahoo Europe quotes have an N/A field before ++ # the date. Check for this and drop the N/A if it is ++ # there and the date is valid. ++ ++ if($q[3] eq "N/A" && $q[4] =~ m/[0-9]+:[0-9]{2}[AP]M/) { ++ splice(@q,3,1); ++ } ++ ++ # If we weren't using a two dimensional + # hash, we could do the following with + # a hash-slice. Alas, we can't. This just + # loads all the returned fields into our hash. +@@ -245,6 +254,8 @@ + # backward compatability. Needed because Yahoo + # returns GBP as GBp. There may be others. + $info{$symbol,"currency"} =~ tr/a-z/A-Z/; ++ # Remove spaces from currency. ++ $info{$symbol,"currency"} =~ s/ //; + # printf "Currency %s specified by Yahoo\n", $info{$symbol,"currency"}; + } else { + # Determine the currency from the exchange name. +@@ -265,7 +276,7 @@ + # return in pence. We'd like them to return in pounds + # (divide by 100). + if (defined($exchange)) { +- if (($exchange eq "L" && $info{$symbol,"currency"} eq "GBP") || ++ if ((($exchange eq "L" || $exchange eq "MF") && $info{$symbol,"currency"} eq "GBP") || + ($exchange eq "TA")) { + foreach my $field ($quoter->default_currency_fields) { + next unless ($info{$symbol,$field}); +--- ../orig/libfinance-quote-perl-1.13/test/yahoo_europe.t 2007-01-01 07:23:58.000000000 +0100 ++++ test/yahoo_europe.t 2008-06-29 18:30:06.000000000 +0200 +@@ -12,23 +12,23 @@ + my $year = (localtime())[5] + 1900; + my $lastyear = $year - 1; + +-my %quotes = $q->yahoo_europe("12150.PA","BOGUS.L"); ++my %quotes = $q->yahoo_europe("UG.PA","BOGUS.L"); + ok(%quotes); + + # Check the nav values are defined. These are the most + # used and most reliable indicators of success. +-ok($quotes{"12150.PA","last"} > 0); +-ok(length($quotes{"12150.PA","name"}) > 0); +-ok($quotes{"12150.PA","success"}); +-ok($quotes{"12150.PA", "currency"} eq "EUR"); +-ok(substr($quotes{"12150.PA","isodate"},0,4) == $year || +- substr($quotes{"12150.PA","isodate"},0,4) == $lastyear); +-ok(substr($quotes{"12150.PA","date"},6,4) == $year || +- substr($quotes{"12150.PA","date"},6,4) == $lastyear); ++ok($quotes{"UG.PA","last"} > 0); ++ok(length($quotes{"UG.PA","name"}) > 0); ++ok($quotes{"UG.PA","success"}); ++ok($quotes{"UG.PA", "currency"} eq "EUR"); ++ok(substr($quotes{"UG.PA","isodate"},0,4) == $year || ++ substr($quotes{"UG.PA","isodate"},0,4) == $lastyear); ++ok(substr($quotes{"UG.PA","date"},6,4) == $year || ++ substr($quotes{"UG.PA","date"},6,4) == $lastyear); + + # Make sure we don't have spurious % signs. + +-ok($quotes{"12150.PA","p_change"} !~ /%/); ++ok($quotes{"UG.PA","p_change"} !~ /%/); + + # Check that a bogus stock returns no-success. + ok(! $quotes{"BOGUS","success"}); +@@ -39,13 +39,13 @@ + ok($londonquotes{"BAY.L","success"}); + ok($londonquotes{"BAY.L","currency"} eq "GBP"); + ok(($londonquotes{"BAY.L","currency"} eq "GBP") && +- !defined($londonquotes{"BAY.L","currency_set_by_fq"})); ++ defined($londonquotes{"BAY.L","currency_set_by_fq"})); + + %londonquotes = $q->fetch("yahoo_europe","CCR.L"); + ok($londonquotes{"CCR.L","success"}); +-ok($londonquotes{"CCR.L","currency"} eq "EUR"); +-ok(($londonquotes{"CCR.L","currency"} eq "EUR") && +- !defined($londonquotes{"CCR.L","currency_set_by_fq"})); ++ok($londonquotes{"CCR.L","currency"} eq "GBP"); ++ok(($londonquotes{"CCR.L","currency"} eq "GBP") && ++ defined($londonquotes{"CCR.L","currency_set_by_fq"})); + + # Copenhangen stocks should be returned in Danisk Krone (DKK). + +@@ -53,7 +53,7 @@ + ok($copenhagenquotes{"TDC.CO","success"}); + ok($copenhagenquotes{"TDC.CO","currency"} eq "DKK"); + ok(($copenhagenquotes{"TDC.CO","currency"} eq "DKK") && +- !defined($copenhagenquotes{"TDC.CO","currency_set_by_fq"})); ++ defined($copenhagenquotes{"TDC.CO","currency_set_by_fq"})); + + # Two stocks from the German XETRA. One in EUR and one in USD. + +@@ -61,6 +61,6 @@ + ok($xetraquotes{"DBK.DE","success"}); + ok($xetraquotes{"DBK.DE","currency"} eq "EUR"); + ok(($xetraquotes{"DBK.DE","currency"} eq "EUR") && +- !defined($xetraquotes{"DBK.DE","currency_set_by_fq"})); ++ defined($xetraquotes{"DBK.DE","currency_set_by_fq"})); + + --- libfinance-quote-perl-1.16.orig/debian/patches/07_encoding.diff.DISABLED +++ libfinance-quote-perl-1.16/debian/patches/07_encoding.diff.DISABLED @@ -0,0 +1,14 @@ +Patch by John Marter . +See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490395 + +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/Yahoo/Base.pm 2006-07-28 00:38:41.000000000 +0200 ++++ lib/Finance/Quote/Yahoo/Base.pm 2008-08-27 19:26:13.000000000 +0200 +@@ -60,7 +60,7 @@ + close open day_range year_range eps pe div_date div div_yield + cap ex_div avg_vol currency/; + +-@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 t1 d1 c1 p2 v b a p o m w e r r1 d y j1 q a2 c4/; + + # 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. --- libfinance-quote-perl-1.16.orig/debian/patches/03_whatis.diff +++ libfinance-quote-perl-1.16/debian/patches/03_whatis.diff @@ -0,0 +1,98 @@ +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/AEX.pm lib/Finance/Quote/AEX.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/AEX.pm 2005-11-17 07:49:17.000000000 +0100 ++++ lib/Finance/Quote/AEX.pm 2008-02-03 17:31:39.000000000 +0100 +@@ -559,7 +559,7 @@ + + =head1 NAME + +-Finance::Quote::AEX Obtain quotes from Amsterdam Euronext eXchange ++Finance::Quote::AEX - Obtain quotes from Amsterdam Euronext eXchange + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/AIAHK.pm lib/Finance/Quote/AIAHK.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/AIAHK.pm 2006-09-11 16:08:47.000000000 +0200 ++++ lib/Finance/Quote/AIAHK.pm 2008-02-03 17:31:56.000000000 +0100 +@@ -139,7 +139,7 @@ + + =head1 NAME + +-Finance::Quote::AIAHK Obtain quotes from American International Assurance ++Finance::Quote::AIAHK - Obtain quotes from American International Assurance + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/ASEGR.pm lib/Finance/Quote/ASEGR.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/ASEGR.pm 2005-05-05 01:51:11.000000000 +0200 ++++ lib/Finance/Quote/ASEGR.pm 2008-02-03 17:32:10.000000000 +0100 +@@ -111,7 +111,7 @@ + + =head1 NAME + +-Finance::Quote::ASEGR Obtain quotes from Athens Stock Exchange. ++Finance::Quote::ASEGR - Obtain quotes from Athens Stock Exchange. + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/BMONesbittBurns.pm lib/Finance/Quote/BMONesbittBurns.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/BMONesbittBurns.pm 2007-01-08 00:23:20.000000000 +0100 ++++ lib/Finance/Quote/BMONesbittBurns.pm 2008-02-03 17:32:21.000000000 +0100 +@@ -174,7 +174,7 @@ + + =head1 NAME + +-Finance::Quote::BMONesbittBurns Obtain quotes from the BMO NesbittBurns site ++Finance::Quote::BMONesbittBurns - Obtain quotes from the BMO NesbittBurns site + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/Bourso.pm lib/Finance/Quote/Bourso.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/Bourso.pm 2006-12-31 22:21:31.000000000 +0100 ++++ lib/Finance/Quote/Bourso.pm 2008-02-03 17:32:30.000000000 +0100 +@@ -383,7 +383,7 @@ + + =head1 NAME + +-Finance::Quote::Bourso Obtain quotes from Boursorama. ++Finance::Quote::Bourso - Obtain quotes from Boursorama. + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/LeRevenu.pm lib/Finance/Quote/LeRevenu.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/LeRevenu.pm 2006-12-31 21:22:27.000000000 +0100 ++++ lib/Finance/Quote/LeRevenu.pm 2008-02-03 17:32:40.000000000 +0100 +@@ -411,7 +411,7 @@ + + =head1 NAME + +-Finance::Quote::LeRevenu Obtain quotes from http://bourse.lerevenu.com. ++Finance::Quote::LeRevenu - Obtain quotes from http://bourse.lerevenu.com. + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/TSP.pm lib/Finance/Quote/TSP.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/TSP.pm 2007-01-02 02:01:49.000000000 +0100 ++++ lib/Finance/Quote/TSP.pm 2008-02-03 17:32:52.000000000 +0100 +@@ -145,7 +145,7 @@ + + =head1 NAME + +-Finance::Quote::TSP Obtain fund prices for US Federal Government Thrift Savings Plan ++Finance::Quote::TSP - Obtain fund prices for US Federal Government Thrift Savings Plan + + =head1 SYNOPSIS + +diff -ruN ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/USFedBonds.pm lib/Finance/Quote/USFedBonds.pm +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote/USFedBonds.pm 2005-10-22 23:33:17.000000000 +0200 ++++ lib/Finance/Quote/USFedBonds.pm 2008-02-03 17:33:06.000000000 +0100 +@@ -162,9 +162,7 @@ + + =head1 NAME + +-Finance::Quote::USFedBonds +-Get US Federal Bond redemption values directly from the treasury at +-www.publicdebt.treas.gov/sav/savvalue.htm ++Finance::Quote::USFedBonds - Get US Federal Bond redemption values directly from the treasury at www.publicdebt.treas.gov/sav/savvalue.htm + + =head1 SYNOPSIS + --- libfinance-quote-perl-1.16.orig/debian/patches/02_typo.diff +++ libfinance-quote-perl-1.16/debian/patches/02_typo.diff @@ -0,0 +1,13 @@ +Bug 409358, reported by Andrew Schulman . + +--- ../orig/libfinance-quote-perl-1.13/lib/Finance/Quote.pm 2007-01-08 00:53:49.000000000 +0100 ++++ lib/Finance/Quote.pm 2007-04-14 18:42:35.000000000 +0200 +@@ -694,7 +694,7 @@ + This module gets stock quotes from various internet sources, including + Yahoo! Finance, Fidelity Investments, and the Australian Stock Exchange. + There are two methods of using this module -- a functional interface +-that is depreciated, and an object-orientated method that provides ++that is deprecated, and an object-orientated method that provides + greater flexibility and stability. + + With the exception of straight currency exchange rates, all information --- libfinance-quote-perl-1.16.orig/debian/patches/09_currency.diff +++ libfinance-quote-perl-1.16/debian/patches/09_currency.diff @@ -0,0 +1,54 @@ +diff -Naur Finance-Quote-1.16/lib/Finance/Quote.pm Finance-Quote-1.16.fix/lib/Finance/Quote.pm +--- Finance-Quote-1.16/lib/Finance/Quote.pm 2009-04-13 09:15:29.000000000 -0500 ++++ Finance-Quote-1.16.fix/lib/Finance/Quote.pm 2009-05-28 09:39:18.000000000 -0500 +@@ -35,16 +35,14 @@ + use Carp; + use Finance::Quote::UserAgent; + use HTTP::Request::Common; +-use HTML::TableExtract; ++use HTML::TreeBuilder; + use Encode; + + use vars qw/@ISA @EXPORT @EXPORT_OK @EXPORT_TAGS + $VERSION $TIMEOUT %MODULES %METHODS $AUTOLOAD + $YAHOO_CURRENCY_URL $USE_EXPERIMENTAL_UA/; + +-$YAHOO_CURRENCY_URL = "http://uk.finance.yahoo.com/currency/convert?amt=1&submit=Convert&"; +-# If the above URL ever fails, try rewriting this module to use the URL below. +-# $YAHOO_CURRENCY_URL = "http://uk.finance.yahoo.com/q?s=USDCAD%3DX"; ++$YAHOO_CURRENCY_URL = "http://uk.finance.yahoo.com/q?s="; + + @ISA = qw/Exporter/; + @EXPORT = (); +@@ -241,16 +239,23 @@ + + my $ua = $this->user_agent; + +- my $data = $ua->request(GET "${YAHOO_CURRENCY_URL}from=$from&to=$to")->content; +- my $te = HTML::TableExtract->new( headers => ['Symbol', 'Bid', 'Ask'] ); +- $te->parse(decode_utf8($data)); # The web page returns utf8 content which gives +- # a warning when parsing $data in HTML::Parser ++ my $data = $ua->request(GET "${YAHOO_CURRENCY_URL}$from$to%3DX")->content; ++ # The web page returns utf8 content which gives a warning when parsing $data ++ # in HTML::Parser ++ my $tb = HTML::TreeBuilder->new_from_content(decode_utf8($data)); ++ ++ # Find the
with the data ++ my $div = $tb->look_down('id','yfi_quote_summary_data'); ++ # Make sure there's a
to parse. ++ return undef unless $div; ++ ++ # The first should contain the quote ++ my $rate_element=$div->look_down('_tag','b'); ++ # Make sure there's a to parse. ++ return undef unless $rate_element; + +- # Make sure there's a table to parse. +- return undef unless ($te->tables); ++ my $exchange_rate=$rate_element->as_text; + +- 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