Follow

Installing Perl module for use with script

As Traverse is shipped with "barebones" Perl libraries. To be able to use custom Perl libraries, it is recommended to isolate the required Perl module for your script and its dependencies on a separate server (via 'yum install' or Strawberry Perl). Once they are downloaded, you may copy them to the <TRAVERSE_HOME>\plugin directory (to keep future upgrades from deleting the libraries from within other Traverse directories) on the BVE server.

Once the Perl module(s) are available within the plugins directory, in your Perl script, you can provide a path to them using:

#begin code

#!/usr/bin/perl -w
#
use Cwd 'abs_path';
use lib (abs_path(dirname($0)). "/../../");
use File::ReadBackwards;

#end code

The above assumes the script is located under <TRAVERSE_HOME>\plugin\monitors\YOUR-SCRIPT-DIRECTORY and File::Readbackwards is located under <TRAVERSE_HOME>\plugin (<TRAVERSE_HOME>\plugin\File\Readbackwards\Readbackwards.pm).

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.