From 40472fd8bcce52e29580682ebfe50ebeed9107ab Mon Sep 17 00:00:00 2001 From: Matthias Merz Date: Sat, 9 Jun 2018 13:05:44 +0200 Subject: [PATCH] add testcode --- test.pl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test.pl diff --git a/test.pl b/test.pl new file mode 100644 index 0000000..bc9fe56 --- /dev/null +++ b/test.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + + +use Finance::Quote; + +my @papers; +if (@ARGV) { + @papers = @ARGV; +} else { + # example values + @papers = ("A0M9A2", "DE0005326565"); +} + + + +my $q = Finance::Quote->new("DKB"); + +my %retvals = $q->fetch("dkb",@papers); +#my @details = $q->labels(); +my @details = ('name', 'price', 'currency', 'date'); + +foreach my $fund (@papers) { + foreach my $detail (@details) { + print "got $detail with value $retvals{$fund, $detail}\n"; + } + print "\n"; +} + +print "\n";