Jump to content

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...