Search code examples
linuxperlubuntu

How to Call Custom Perl Module in a Script


I am installing mireap software on my Linux VM (https://sourceforge.net/projects/mireap/). After installation, I am unable to run the software as I am always getting the error that FFW1.pm module needs to be installed; however, the module is present in lib directory. The script failed to call the module from the library. I will really appreciate if you help me in this regard. The steps which I performed are there in the image.


Solution

  • It's not clear what you mean by "lib directory".

    If you mean the the module is in a directory named lib, and that this directory is a subdirectory of the one in which the script is located, then this should be added to the script:

    use FindBin qw( $RealBin );
    use lib "$RealBin/lib";