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/Calc.pm 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:

http://catcode.com/date/pcalc.html

http://search.cpan.org/dist/Date-Pcalc/Pcalc.pm

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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