• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7482: Can't install TWiki extensions via configure, due to deprecated syntax in TWiki::Extender::remap

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine Configuration Normal Closed   patch 6.0.1

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

This is another case of Item6800, but on my platform it is an error. I am running Ubuntu 13.10, with Perl v5.14.2.

May be the cause of TWiki:Support.SID-01375 and TWiki:Support.SID-01591.

For all plugins I've attempted to install I get the following message:

Warning: CPAN is not available, some installer functions have been disabled
Error: Installer returned errors:
************************************************************
Could not load installer script from tools/extender.pl.

If this is a TWiki release prior to 4.2, please download the
latest version of the script from:

http://twiki.org/cgi-bin/view/Codev/ExtenderScript

and place it in the 'tools' directory below your installation
root (create the directory if necessary).

If this is TWiki 4.2 or later, the script is missing from
your installation, or may be broken.
************************************************************
 at /usr/share/perl/5.14/CGI/Carp.pm line 379
   CGI::Carp::realdie('************************************************************\x{a}...') called at /usr/share/perl/5.14/CGI/Carp.pm line 468
   CGI::Carp::die('************************************************************\x{a}...') called at /var/www/twiki/HistoryPlugin_installer line 66
   require /var/www/twiki/HistoryPlugin_installer called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 177
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x269b998)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478
 at /usr/share/perl/5.14/CGI/Carp.pm line 379
   CGI::Carp::realdie('************************************************************\x{a}...') called at /usr/share/perl/5.14/CGI/Carp.pm line 468
   CGI::Carp::die('************************************************************\x{a}...') called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 179
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x269b998)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478

I tracked the problem to twiki/tools/extender.pl, TWiki::Extender::remap. It contains a deprecated syntax for the use of qw in a list context, as described here Use of qw(...) as parentheses.

When the qw statements are wrapped in parenthesis the error goes away.

The patch:

$ svn diff
Index: core/tools/extender.pl
===================================================================
--- core/tools/extender.pl   (revision 27253)
+++ core/tools/extender.pl   (working copy)
@@ -140,13 +140,13 @@
     if (defined $cfg{UsersTopicName}) {
         $file =~ s#(Main)/TWikiUsers\.txt(.*)$#$1/$cfg{UsersTopicName}.txt$2#;
     }
-    foreach my $w qw( SystemWebName TrashWebName UsersWebName ) {
+    foreach my $w ( qw( SystemWebName TrashWebName UsersWebName )) {
         if (defined $cfg{$w}) {
             $file =~ s#^data/$w/#data/$cfg{$w}/#;
             $file =~ s#^pub/$w/#pub/$cfg{$w}/#;
         }
     }
-    foreach my $t qw( NotifyTopicName HomeTopicName WebPrefsTopicName MimeTypesFileName ) {
+    foreach my $t ( qw( NotifyTopicName HomeTopicName WebPrefsTopicName MimeTypesFileName )) {
         if (defined $cfg{$t}) {
             $file =~ s#^data/(.*)/$t\.txt(,v)?#data/$1/$cfg{$t}.txt$2/#;
             $file =~ s#^pub/(.*)/$t/([^/]*)$#pub/$1/$cfg{$t}/$2/#;

-- TWiki:Main/DavidDAllen - 2014-04-08

I also note that Item6965 is a problem on my platform, as can be seen from the warning:

Warning: CPAN is not available, some installer functions have been disabled

-- TWiki:Main.DavidDAllen - 2014-04-08

Thank you David! This is now in SVN trunk and 6.0 branch, ready for TWiki-6.0.1 release.

-- TWiki:Main.PeterThoeny - 2014-10-04

ItemTemplate
Summary Can't install TWiki extensions via configure, due to deprecated syntax in TWiki::Extender::remap
ReportedBy TWiki:Main.DavidDAllen
Codebase ~twiki4, 6.0.0
SVN Range TWiki-6.0.1-trunk, Sat, 22 Mar 2014, build 27164
AppliesTo Engine
Component Configuration
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:28177 TWikirev:28178 TWikirev:28179 TWikirev:28180
TargetRelease patch
ReleasedIn 6.0.1
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2014-10-06 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback