[rt-users] Cannot locate RT/FM.pm

Woody - Wild Things woody at wildthingsafaris.com
Sat May 23 10:04:18 EDT 2009


Ruslan Zakirov wrote:
> That leading double slash (//var/...) causes your problems. I think
> it's in lib/RT.pm, you can fix it by hand. 

Thanks Ruslan,

The offending // was found in webmux.pl, but didn't solve the issue. 
However your pointer to RT.pm did allow me to hack a fix:

sub InitPluginPaths {
     my $self = shift || __PACKAGE__;

     my @lib_dirs = $self->PluginDirs('lib');

     my @tmp_inc;
     for (@INC) {
         if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
             push @tmp_inc, $_, @lib_dirs;
         } else {
             push @tmp_inc, $_;
         }
     }
     push @tmp_inc, @lib_dirs; # <------------- added
     my %seen;
     @INC = grep !$seen{$_}++, @tmp_inc;
}

I added the push as the @lib_dirs was not being added to @INC, but now 
its not in the correct place i assume - its right at the end.

It works, but I'm sure it would be better to fix the
if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
properly, but that seems so far to be beyond me.....

Thanks very much. Now on to configure RTFM :)

w.

-- 
-----------------------
Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Mobile: +255 (0) 773 503 502

http://www.wildthingsafaris.com
http://www.wildthingsafaris.com/pub/woody.html



More information about the rt-users mailing list