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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installing an external Perl module

Status
Not open for further replies.

chriswarner73

Programmer
Dec 11, 2006
1
CZ
Hi everyone.

I want to install a date manipulation module i.e. date:calc
from the CPAN site.


Can anyone be so kind as to let me know how I may actully do this?
As far as I am aware the Perl folder does not seem to have a library folder with any modules in it. Do I need to make this so called library folder, somehow install the module there and reference it from within the script i.e. '/sw/perl/somefolder'?

I have never used external modules within Perl. Any help that would enable me to add an external module and create an object would be appreciated.

In short I have a script that needs to have access to a function that can for example add 16 days to date x and return a date.

Many thanks.
 
Code:
perl -MCPAN -e "install Date::Calc"

Just be sure to run as root.
 
I just tried this method, installing the same module on a windows xp machine.

I keep getting the message
'Perl lib version (v5.6.1) doesn't match executable version (v5.8.8) at D:\oracle
\product\10.1.0\db_1\perl\5.6.1\lib\MSWin32-x86/Config.pm line 21.'

Am I supposed to upgrade the perl version Oracle is using? Aren't they backwards compatible?
 
The version of perl that you are using v5.6.1 does not match the version of the module that you installed v5.8.8. Yes, in theory modules should be backward compatible, but you're talking about forward compatibility in this instance. Find a perl v5.6 version of the module.

On windows, I personally always install modules using the ppm (Perl Package Manager). It seems to always handle the versions well (I use v5.8). I learned some things about it from this slightly outdated faq ( and other google searches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top