add testcode
This commit is contained in:
parent
e8559dd6d4
commit
40472fd8bc
29
test.pl
Normal file
29
test.pl
Normal file
@ -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";
|
Loading…
x
Reference in New Issue
Block a user