You are here: Foswiki>Tasks Web>Item13345 (22 Jul 2015, GeorgeClark)Edit Attach

Item13345: "any" pragma is deprecated in CGI-4.14

pencil
Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component:
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
CGI-4.14 has just seen the light and it already is causing the next trouble on our aging code base. These are rough times for long-time CGI users wink

It now generates lots of warnings in the logs. Removing the any pragma seems to be required as we don't seem to need it, right?

-- MichaelDaum - 01 Apr 2015

The -any pragma comes into play if the code "invents new" CGI generation routines by "just calling them". So if a plugin wanted to output a verbatim tag which is specific to Foswiki, it could do something like:
use CGI qw(-any);      # The current Foswiki default
$cgi=CGI->new;
$output .=  $cgi->verbatim({class=>'TML'});

I doubt anything in core does this. No idea about user extensions.

-- GeorgeClark - 01 Apr 2015

Hello there,

I get the error as reported under http://foswiki.org/Tasks/Item2006, but the deletion of the '-w' won't resolve the issue. I have CGI 4.21 ver and perl 5.18.2... I tried to change all the pm modules that contain calls to CGI (eg from "use CGI qw( -any )" to "use CGI qw()", but still i get the same error. Any ideas? BRs

Pavlos

-- PavlosKaimakis - 22 Jul 2015

on 1.1.x releases, it's also found in bin/configure around line 264:
::_loadBasicModule('CGI qw(:any)');

Change it to read:
::_loadBasicModule('CGI');

For future reference, please ask follow-up questions on the Support web. Once a task is closed, we don't often pay close attention to it.

-- GeorgeClark - 22 Jul 2015
 
Topic revision: r7 - 22 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy