galatime Posted September 24, 2004 Posted September 24, 2004 Hi, I recently installed (with Lisa's help) the Finance::Yahoo Perl package, available from CPAN. It's used for retrieving stock quotes from Yahoo Finance. To test if it works, I created a simple script, shown below: --------------------- #!/usr/bin/perl -w use strict ; use CGI::Carp qw(fatalsToBrowser); use lib '/home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib'; use Finance::Quote; print "Content-type: text/html\n\n"; print "<html>"; print "<head></head>"; print "<body>"; # This line will print the contents of Perl's @INC variable print "\@INC is @INC" ; # create object my $q = Finance::Quote->new(); print "</body>"; print "</html>"; --------------------- When I try to run it (at http://www.galatime.com/cgi-bin/test.pl), it does print the INC contents, with the correct path to the F::Q package. "@INC is /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl ." However, it then dies at the "my $q = Finance::Quote->new()" line with the following error: "Software error: Can't locate object method "methods" via package "Finance::Quote::Cdnfundlibrary" at /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib/Finance/Quote.pm line 109." Debugging: * I have all permissions set to 755 * Error log in Cpanel says: "[Fri Sep 24 15:13:28 2004] test.pl: Can't locate object method "methods" via package "Finance::Quote::Cdnfundlibrary" at /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib/Finance/Quote.pm line 109. [Fri Sep 24 15:13:28 2004] test.pl: BEGIN failed--compilation aborted at /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib/Finance/Quote/Cdnfundlibrary.pm line 20. [Fri Sep 24 15:13:28 2004] test.pl: Can't locate HTML/TableExtract.pm in @INC (@INC contains: /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/galatim/public_html/cgi-bin/Finance-Quote-1.08/lib/Finance/Quote/Cdnfundlibrary.pm line 20. " PLEASE HELP!!! Thanks, GalaTime Quote
galatime Posted September 24, 2004 Author Posted September 24, 2004 FIXED! I figured out that the HTML::TableExtract is not part of Perl, so I downloaded it, and now it works! Never mind :-) -GalaTime Quote
TCH-Don Posted September 24, 2004 Posted September 24, 2004 Wahoo welcome to the TCH self help forum glad you got it working Quote
TCH-Rob Posted September 25, 2004 Posted September 25, 2004 Now thats what I call service. A 10 minute fix no less. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.