• 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.

Item6800: Use of qw(...) as parentheses, which is deprecated in Perl 5.14

Item Form Data

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

Edit Form Data

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

Detail

TWiki uses "qw(...)" as parentheses in a number of locations. This construct is deprecated in perl 5.14, and causes various functions in TWiki to generate warning messages. For example, the TWiki mailnotify script triggers these warning messages (I've removed the site-specific portion of the source file paths):

[Thu Aug 25 00:30:02 2011] Load.pm: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Configure/Load.pm line 89.

[Thu Aug 25 00:30:02 2011] Func.pm: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Func.pm line 3044.

[Thu Aug 25 00:30:02 2011] Func.pm: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Func.pm line 3045.

[Thu Aug 25 00:30:02 2011] mailnotify: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Store.pm line 206.

[Thu Aug 25 00:30:02 2011] mailnotify: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Store/RcsFile.pm line 1130.

[Thu Aug 25 00:30:02 2011] mailnotify: Use of qw(...) as parentheses is deprecated at [...]/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 140.

The solution is to place the value lists of foreach loops inside parentheses, as in this example from Load.pm:

foreach my $var qw( DataDir DefaultUrlHost PubUrlPath WorkingDir PubDir TemplateDir ScriptUrlPath LocalesDir ) {

should be

foreach my $var (qw( DataDir DefaultUrlHost PubUrlPath WorkingDir PubDir TemplateDir ScriptUrlPath LocalesDir )) {

While I have not installed TWiki 5.1.0, I have looked at the source and found that the problem has not been fixed there.

-- TWiki:Main.PaulMerchantJr - 2011-08-25

Thanks for reporting. Confirmed. Core code is pending. We already fixed many plugins, see Item6725.

-- TWiki:Main.PeterThoeny - 2011-08-25

Unless I missed somthing, this is now all fixed, core, contribs and plugins. Done in svn trunk and 5.1 branch.

-- TWiki:Main.PeterThoeny - 2011-09-13

Re-opening, found more code to fix.

-- TWiki:Main.PeterThoeny - 2011-11-11

Now fixed CGI::Session, DatabasePlugin, WysiwygPlugin

-- TWiki:Main.PeterThoeny - 2011-11-12

Edit | Attach | Watch | Print version | History: r57 < r56 < r55 < r54 < r53 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r57 - 2012-01-16 - GeorgeTrubisky
 
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