diff options
author | John Wiegley <johnw@newartisans.com> | 2004-11-08 06:43:11 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:47 -0400 |
commit | c9fb11bd60a2170fb896d77ff8d7706f563ad597 (patch) | |
tree | 42bdf09e7d8727ba31d1d8dae9b4eb4b2a605441 /scripts/getquote | |
parent | fa2ceaed13c031add578ee8eb33da0c9980b9fb1 (diff) | |
download | fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.gz fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.bz2 fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.zip |
updated to version 2.0
Diffstat (limited to 'scripts/getquote')
-rwxr-xr-x[-rw-r--r--] | scripts/getquote | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/getquote b/scripts/getquote index cf8c8abd..bed561d6 100644..100755 --- a/scripts/getquote +++ b/scripts/getquote @@ -1,16 +1,16 @@ #!/usr/bin/perl -exit 0 if $ARGV[0] eq "\$"; +$timeout = 60; use Finance::Quote; $q = Finance::Quote->new; - -$q->timeout(60); +$q->timeout($timeout); $q->require_labels(qw/price/); %quotes = $q->fetch("nasdaq", $ARGV[0]); - if ($quotes{$ARGV[0], "price"}) { print "\$", $quotes{$ARGV[0], "price"}, "\n"; +} else { + exit 1; } |