[rt-users] Plugins question

Jerrad Pierce jpierce at cambridgeenergyalliance.org
Sun Sep 7 15:44:30 EDT 2008


>
> Are you perhaps trying to write your own scripts that use RT's libraries
> and not calling RT::Init?
>
As stated, I am trying to use a script from the wiki, but I happen to have
plugins installed.
Said script makes no use of plugins, and does in fact call RT::Init.


> is sub RT::InitPluginPaths getting called?  Is it finding the plugin
> directory? Is it deciding to skip the plugin's lib dir for some reason?
>
Actually the test:
   if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
fails, and only that branch allows @tmp_libs #$self->PluginDirs('lib')
into @INC

Apparently the oft-cargo-culted script initialization is not very robust,
and it should have
 use lib qw'/opt/rt3/lib /opt/rt3/local/lib';

You'll likely need to actually add a bit of logging or debugging output to
> the core to see what's going wrong so you can help us fix it.
>
Done, but I wonder if a larger design issue is at hand, namely that there
seems to be no allowance for a minimal setup e.g; no plugins; to support the
proper initialization of scripts...

-- 
Cambridge Energy Alliance: Save money & the planet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080907/1c9b0ce5/attachment.htm>


More information about the rt-users mailing list