SID-01501: bin/statistics uses os supplied File:Temp and not lib/CPAN
| Status: |
Answered |
TWiki version: |
5.1.1 |
Perl version: |
perl 5.8.8 |
| Category: |
CategoryStatistics |
Server OS: |
Centos 5.8.8 |
Last update: |
13 years ago |
The setlib.cfg file in TWIKIHOME/bin appends the TWIKIHOME/lib/CPAN directory to the PERL
@INC
array. This means that a call to
use File::Temp; results in pulling the vendor supplied File/Temp.pm and not the one in twiki. Under Centos 5.8 the seekable option is missing from File::Temp and thus statistics fails to run.
Changing statistics to add:
unshift(@INC,"/var/www/auth/twiki/lib/CPAN/lib");
after the BEGIN block and before
use TWiki;
I think the files in TWIKIHOME/lib/CPAN should be placed at the beginning of the
@INC
array and not pushed onto the end by setlib.cfg even if if ($defaultingCPANBASE) is true.
--
JohnRouillard - 2012-07-12
Discussion and Answer
You can define this in
twiki/lib/LocalLib.cfg:
$CPANBASE = "$twikiLibPath/CPAN/lib/";
This will assure that the CPAN base of TWiki is in front of the Perl lib path.
I'll update the comments in
twiki/bin/LocalLib.cfg.txt to clarify this.
--
PeterThoeny - 2012-10-24
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.