Previous Section  < Day Day Up >  Next Section

Installing Swatch

  1. Swatch requires Perl 5 or higher. If you have a fairly new installation of Linux or BSD (less than a year old), then you should have a sufficiently current version.

  2. Swatch also requires several Perl modules, which are add-on subprograms for the Perl language. These modules are Date::Calc, Date::HiRes, and Date::Format. The configuration process will tell you if you are missing these modules. To get them, you can check the Web site to see if there is an RPM available for your distribution.

    If you used a Linux distribution, there is a good chance there are RPMs to load these modules on your distributions disks. If you don't have an RPM for the Perl modules, you can use the Comprehensive Perl Archive Network (CPAN) system for downloading the required modules. (The CPAN system is a way to auto download required Perl libraries without a lot of hassle.) To do this, type the following command:


    cpan –i module-name

    where you replace module-name with Date::Calc or whatever module you are trying to load. Make sure you get the spelling and capitalization right and use both colons. You will have to do this three times—once for each required module above. The CPAN system will take care of contacting the central CPAN servers, downloading the module, and installing it for you.

  3. graphics/cd_icon_icon.gif Download the tar file from the book's CD-ROM or the Sourceforge Web site and unzip it.

  4. Since Swatch is a Perl program, the installation process is slightly different than the previous C-based programs. The sequence of commands to type is:


    perl Makefile.PL
    make test
    make install
    make realclean

Once those processes are done, Swatch is installed and ready to go.

    Previous Section  < Day Day Up >  Next Section