Installing packaged non-CPAN Perl modules

Learn how to a packaged non-CPAN Perl module.

About this task

You might want to install a non-CPAN (user-written) packaged library module. For example, you wrote and packaged a library for internal use, or downloaded one from a site other than CPAN. In that case, follow these steps. The package name in this example is Digest::SHA.

Procedure

  1. Extract the module source code and change to the extracted source directory.
  2. Prepare (clean) the directory for installation, assuming that your make command has a clean argument available.
    make clean
  3. Run nzenv and add each of the results to your environment.
    Run the command as follows to add Netezza-specific environment variables:
    eval `nzenv`
  4. Export the following variables:
    export EXE_POINTER_SIZE=32
    export ABI=32
    export CC
    export CXX
    PATH=$NZ_EXPORT_DIR/ae/sysroot/host/bin:
    $NZ_EXPORT_DIR/ae/languages/perl/5.8/host/bin:${PATH}
    export LD_LIBRARY_PATH=$NZ_EXPORT_DIR/ae/sysroot/host/lib:
    $NZ_EXPORT_DIR/ae/languages/perl/5.8/host/lib
    export LD_RUN_PATH=$LD_LIBRARY_PATH
    export CFLAGS=-m32
    export CPPFLAGS=-m32
    export CXXFLAGS=-m32
    export LDFLAGS=-m32
  5. By using the host Perl module, run the Perl makefile. Pass the prefix for the directory.
    /nz/export/ae/languages/perl/5.8/host/bin/perl Makefile.PL PREFIX=$
    {NZ_EXPORT_DIR}/ae/applications/perl/host
  6. Build the target.
    make
  7. Install the packaged non-CPAN Perl module.
    make install
  8. Test the installation.
    /nz/export/ae/languages/perl/5.8/spu/bin/perl -e 'use Digest::SHA;'