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

Kevin Falcone falcone at bestpractical.com
Wed Oct 7 13:19:48 EDT 2009


On Wed, Oct 07, 2009 at 11:43:26AM -0400, Jason A. Smith wrote:
> Hi,
> 
> 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
> @INC.
> 
> 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?

Usually this gets written (on systems where RT doesn't live in @INC)
use lib ('/opt/rt3/local/lib','/opt/rt3/lib');

> 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.

This has been discussed internally, but I don't know if there is a bug
open for changing it.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20091007/7adc06e9/attachment.pgp 


More information about the Rt-devel mailing list