[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for misc/p5-Finance-QuoteHist
- To: ports@openbsd.org
- Subject: patch for misc/p5-Finance-QuoteHist
- From: Andrew Dalgleish <openbsd@ajd.net.au>
- Date: Tue, 2 Sep 2003 15:02:47 +1000
- Content-Disposition: inline
- User-Agent: Mutt/1.4i
Bring Finance::QuoteHist up to date, and add a fix for yet another
yahoo format change.
Regards,
Andrew Dalgleish
http://www.ajd.net.au/
Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/misc/p5-Finance-QuoteHist/Makefile,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 Makefile
--- Makefile 13 Apr 2003 19:31:33 -0000 1.1.1.1
+++ Makefile 2 Sep 2003 05:02:30 -0000
@@ -2,7 +2,7 @@
COMMENT= "module to obtain historical financial quotes from exchanges"
-DISTNAME= Finance-QuoteHist-0.31
+DISTNAME= Finance-QuoteHist-0.32
PKGNAME= p5-${DISTNAME}
CATEGORIES= misc perl5
Index: distinfo
===================================================================
RCS file: /cvs/OpenBSD/ports/misc/p5-Finance-QuoteHist/distinfo,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 distinfo
--- distinfo 13 Apr 2003 19:31:33 -0000 1.1.1.1
+++ distinfo 2 Sep 2003 05:02:30 -0000
@@ -1,3 +1,3 @@
-MD5 (Finance-QuoteHist-0.31.tar.gz) = 82921cf038730c020c52a5695e5740c7
-RMD160 (Finance-QuoteHist-0.31.tar.gz) = 8f5b8150dbc398cb9cdd3aabd182a9f25114c9f0
-SHA1 (Finance-QuoteHist-0.31.tar.gz) = ddbde6ea5f01e02402214007f49f627318811d16
+MD5 (Finance-QuoteHist-0.32.tar.gz) = ae3c8a531188688bfbb6a0cea49c8f94
+RMD160 (Finance-QuoteHist-0.32.tar.gz) = 3067c208474b8af1e8f57fbf6f60e4b61f37756f
+SHA1 (Finance-QuoteHist-0.32.tar.gz) = a3cd0a9036ffdcc83b49f500f913bcfd960c9374
Index: patches/patch-lib_Finance_QuoteHist_Generic_pm
===================================================================
RCS file: /cvs/OpenBSD/ports/misc/p5-Finance-QuoteHist/patches/patch-lib_Finance_QuoteHist_Generic_pm,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-lib_Finance_QuoteHist_Generic_pm
--- patches/patch-lib_Finance_QuoteHist_Generic_pm 13 Apr 2003 19:31:33 -0000 1.1.1.1
+++ patches/patch-lib_Finance_QuoteHist_Generic_pm 2 Sep 2003 05:02:30 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-lib_Finance_QuoteHist_Generic_pm,v 1.1.1.1 2003/04/13 19:31:33 sturm Exp $
---- lib/Finance/QuoteHist/Generic.pm.orig Thu Mar 27 14:41:49 2003
-+++ lib/Finance/QuoteHist/Generic.pm Thu Mar 27 14:42:35 2003
+--- lib/Finance/QuoteHist/Generic.pm.orig 2003-01-16 17:38:20.000000000 +1100
++++ lib/Finance/QuoteHist/Generic.pm 2003-09-02 01:34:03.000000000 +1000
@@ -24,6 +24,7 @@ my @Scalar_Flags = qw(
ratio_precision
attempts
@@ -24,16 +24,37 @@
if ($empty_fetch{$s}) {
print STDERR ref $self,
" passing on $s ($target) for now, empty fetch\n"
-@@ -1190,6 +1197,24 @@ of your rows is important you might want
- flag. If the overall order is not that important, then ignore this
+@@ -551,7 +558,9 @@ sub rows {
+
+ # Prep the rows
+ foreach (@$rows) {
++ next if (!defined($_));
+ foreach (@$_) {
++ next if (!defined($_));
+ # Zap leading and trailing white space
+ s/^\s+//;
+ s/\s+$//;
+@@ -709,6 +718,11 @@ sub non_quote_row {
+ my @non_quotes;
+ foreach (0 .. $#$row) {
+ next if $_ == $dcol;
++ # Rows which have undefined fields
++ # (Yahoo include "date,dividend" in with the quotes)
++ if (!defined($row->[$_])) {
++ return $row;
++ }
+ next if $row->[$_] =~ /^\s*$/;
+ if ($row->[$_] !~ /^\s*\$*[\d\.,]+\s*$/) {
+ return $row;
+@@ -1191,6 +1205,24 @@ flag. If the overall order is not that i
flag. Typically, site-specific sub classes of this module will take
care of setting this appropriately. The default is 0.
-+
+
+=item reverse_fetch
+
+(The default value is 0.)
+
-+If true, Twe fetch each batch of rows in the reverse order to that
++If true, we fetch each batch of rows in the reverse order to that
+provided by C<quote_urls()>.
+
+Note that the order of rows within blocks is not affected,
@@ -46,6 +67,7 @@
+By requesting the blocks in the reverse order I get all the data.
+I assume this would not work for any symbols without quotes within
+the most recent requested block (ie defunct symbols).
-
++
=item attempts
+ Sets how persistently the module tries to retrieve the quotes. There