Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add perl module using CPAN on macosx 10.5.8

Status
Not open for further replies.

netrookie

Technical User
Jul 6, 2003
29
US
I want to add and use a perl module called Finance::Quote using CPAN.

This is the first module that I had tried to add using CPAN.

I am doing this on my mac book pro that is running perl version 5.8 on mac osx (10.5.8, 2.4Ghz Intel Dual Core 2 Duo)

I am getting the following errors, try to run this test script:
#!/usr/bin/perl

# import module
use Finance::Quote;

# create object
my $q = Finance::Quote->new();

# retrieve stock quote
my %data = $q->fetch('nyse', 'XYZ');

# print price
print "The current price of XYZ on the NYSE is " . $data{'XYZ', 'price'};


Screen output error msg:
./perltestfin.pl
Can't locate Finance/Quote.pm in @INC (@INC contains: /Library/Perl/Updates/5.8.8 /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 .) at ./perltestfin.pl line 4.
BEGIN failed--compilation aborted at ./perltestfin.pl line 4.


What do I need to do to configure this properly? Thanks!


 
Have you actually downloaded, built and installed that module?

You can try to do this automatically through the cpan install Finance::Quote command provided it is configured and your system has access to the 'net to download the files reuqired.

Or you can go to locate, download and install the module manually. There are generic instructions on the site.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top