Smarts: Need to Install External Perl Modules for use with Smarts
search cancel

Smarts: Need to Install External Perl Modules for use with Smarts

book

Article ID: 332126

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

To add an external module to a perl script called by smarts, you can can add that library path two ways:

1) Add that library path in the smarts/bin/system/sm_perl.options file

Add the library path to the end of the SM_PREPEND_ARGS="-I "$SM_HOME"/local/perl/lib" line
so it should read:

SM_PREPEND_ARGS="-I "$SM_HOME"/local/perl/lib -I /new/library/path "

2) Or add the library path in your perl script,  through the use library command.

use lib '/new/library/path";

Make sure that your new library has been compiled with the same version of perl that smarts is using and that all dependencies have been satisfied.
To confirm the version of perl that is installed in Smarts nagivate to the <BASEDIR/SAM/smarts/perl folder and review the folders, you will see a folder that has the version number.  The Smarts 9.2.1 should show 5.8.8 folder. 

Please note, upgrading perl versions is not supported in Smarts, Smarts requires the use of the version that is installed in the base install.  
The only way to upgrade the perl version is to upgrade Smarts.

Additional Information

Customer did confirm that using /sm_perl before the cpan DBI command does work.

Please note adding external perl modules is not supported by GA Technical support -- 
For assistance please contact your Account Manager to request Professional Services engagement.