Getting perl script using DATE::CALC to work on an unsupported architecture

I made a Perl script that used the “Date::Calc” Perl module, and my script worked on my Windows XP machine, but not on a Sun Solaris machine. I believe “Date::Calc” is not pure Perl, and so I was getting the following errors whenever I tried to run the script:

  • Can’t locate Date/ in @INC
    • (This error was coming up because I needed to make a directory called “Date” and place the module in that directory)
    • Can’t locate loadable object for module Date::Calc in @INC
      • The solution: Use the “Date::Pcalc” perl module instead. This module is pure Perl and I only had to change one line of my code: “use Date::Calc” to “use Date::Pcalc”

The Calc::Pcalc module:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s