[Rt-devel] RT Init in custom shell scripts.

Jason A. Smith smithj4 at bnl.gov
Wed Oct 7 11:43:26 EDT 2009


I am in the process of setting up a new RT-3.8.5 server to replace our
old 3.4.5 server.  While testing some of our custom shell scripts (not
scrips), I had a problem with RT::Init failing while it was loading the
additional plugins that we have installed.  I traced the problem to
RT::InitPluginPaths which only adds the plugin's lib path after the
LocalLibPath, and will only do it IF that LocalLibPath is already in

My installation is based on the Fedora rpm, which installs RT into the
vendor_perl area of perl's @INC lib path so all standard RT modules are
found by default.  I guess I expected RT to automatically include the
local lib path in @INC since the variable is defined in RT.pm, but I had
to manually include it in my scripts:

use RT;
use lib $RT::LocalLibPath;

Is this expected?

One possible fix is to append the plugin list of @lib_dirs to the end of
@INC even when $RT::LocalLibPath is not found in @INC, in the
RT::InitPluginPaths function, instead of the current behavior of only
appending it if and when $RT::LocalLibPath is in @INC.


|  Jason A. Smith                          Email:  smithj4 at bnl.gov |
|  Atlas Computing Facility, Bldg. 510M    Phone: +1-631-344-4226  |
|  Brookhaven National Lab, P.O. Box 5000  Fax:   +1-631-344-7616  |
|  Upton, NY 11973-5000,  U.S.A.                                   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3906 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20091007/92799119/attachment.bin 

More information about the Rt-devel mailing list