In this small tutorial, I will show you how to install WWW::Contact module to implement import contact feature from yahoo, gmail, AOL in your perl-cgi website.
I am using centos 5.3 and its bash shell in Poderosa, with a root account:
#find /usr/lib/perl5/5.8.8/CPAN/Config.pm path
locate CPAN/Config.pm
#open to edit and make sure we have access to the Internet
vim /usr/lib/perl5/5.8.8/CPAN/Config.pm
#’connect_to_internet_ok’ => q[1],
#’urllist’ => [],
#Download WWW::Contact packet
wget http://search.cpan.org/CPAN/authors/id/F/FA/FAYLAND/WWW-Contact-0.27.tar.gz
#un compress
tar -xvzf WWW-Contact-0.27.tar.gz
#check config
cd WWW-Contact-0.27
perl Build.PL
#you could see something like this
Checking whether your kit is complete…
Looks good
Checking prerequisites…
Looks good
Deleting Build
Removed previous script ‘Build’
Creating new ‘Build’ script for ‘WWW-Contact’ version ‘0.27′
#If there is any missed module, install it.
Checking prerequisites…
– ERROR: Net::Google::AuthSub is not installed
– ERROR: HTML::TokeParser::Simple is not installed
– ERROR: WWW::Mechanize is not installed
– ERROR: Crypt::SSLeay is not installed
– ERROR: JSON::XS is not installed
– ERROR: Text::vCard::Addressbook is not installed
– ERROR: WWW::Mechanize::GZip is not installed
– ERROR: Moose is not installed
#To install missed modules
perl -MCPAN -e shell
install Net::Google::AuthSub
install HTML::TokeParser::Simple
install WWW::Mechanize
install Crypt::SSLeay
install JSON::XS
install Text::vCard::Addressbook
install WWW::Mechanize::GZip
install Moose
# you may need force install for SSLeay module
force install Crypt::SSLeay
# try to install our Contact module
perl -MCPAN -e shell
install WWW::Contact
#if still cannot install Contact module in automatic mode, try to install it manually
perl Build.PL
./Build
./Build test
./Build install
Congrats ! Your sample should work well now.
Easier way:
install Crypt::SSLeay with your OS package manager.
From command line: `cpan -i WWW::Contact` – there is no need to download it first.
Comment by Alexandr Ciornii — July 24, 2009 @ 2:42 PM