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

Prevent error: "Can't locate Date/Calc.pm in @INC ....

Status
Not open for further replies.

ivtmes

Programmer
Feb 12, 2001
3
US
Is it possible to determine in a script when a module (ie: Date::Calc) is installed?
If it is installed I want to use it. If not, I prefer to use other package for data calculations.

Thanks

 
i think you can use conditional statements with require in your begin block.

BEGIN
{
if(condition)
{
require 'Module.pm'; Module::import();
}
} adam@aauser.com
 
You should also be able to used defined(subroutine) to check. Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top