In your script add: use libs /opt/rt4/lib/
To see if for some reason your env vars aren't seeing the RT path. It "may" be use lib and not use libs. I'm not at workstation to log in and check. Sent from my mobile device. On Mar 28, 2012, at 5:56 PM, Paul Tomblin <[email protected]> wrote: > Is it possible to do a perl unit test that uses the RT config file? I tried > this is my test: > > #!perl -T > > use Test::More tests => 1; > > use RT; > > BEGIN { > RT::LoadConfig(); > use_ok( 'RTx:FooBar' ); > }; > > And I get some errors about being unable to use RT_SiteConfig.pm: > t/01-db.t ......... Couldn't load RT config file RT_SiteConfig.pm: > > Insecure dependency in require while running with -T switch at > /opt/rt4/lib/RT/Config.pm line 904. > BEGIN failed--compilation aborted at t/01-db.t line 11. > # Looks like your test exited with 2 before it could output anything. > t/01-db.t ......... Dubious, test returned 2 (wstat 512, 0x200) > > I've got RTHOME and PERL5LIB set so that it can find the RT installation and > libs. > > -- > http://www.linkedin.com/in/paultomblin > http://careers.stackoverflow.com/ptomblin >
