Tags:
create new tag
view all tags

SID-01501: bin/statistics uses os supplied File:Temp and not lib/CPAN

Status: Answered 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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title bin/statistics uses os supplied File:Temp and not lib/CPAN
SupportCategory CategoryStatistics
TWiki version 5.1.1
Server OS Centos 5.8.8
Web server Apache 2.2.3
Perl version perl 5.8.8
Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-10-24 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.