[Koha] "Add path to @INC" problem revisited - work-around proposal
Anders Wandahl
anders at golonka.se
Tue Aug 15 06:59:32 NZST 2006
Seems like many people have had problems to include the
/usr/local/koha/intranet/modules path
to the @INC - including me using Debian Sarge - but at least I have a
work-around which seems
to do the trick...
Giving up adding the path to @INC I considered adding the "use lib"
command in all perl-files
but there are too many of them. My work-around is simply doing
search-and-replace on multiple
files, i.e. I executed the following command standing in /usr/local/koha:
rpl -eR -xpl '#!/usr/bin/perl' '#!/usr/bin/perl\nuse lib
"/usr/local/koha/intranet/modules";' *
The command recursively replaces
#!/usr/bin/perl
with
#!/usr/bin/perl
use lib "/usr/local/koha/intranet/modules";
in all files with .pl as extension.
You may have to install the "rpl" program, but it's available as a
package at least in Debian.
This worked for me, hopefully it will help others as well...
Best wishes,
/Anders Wandahl
"e-Math for Africa"
http://math.golonka.se
More information about the Koha
mailing list