Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Using CGI.pm is quite fine. It is still a CPAN module, and still supported by Debian. Moving to PSGI/Plack might be an option, but it is not at all compulsory. In Debian Wheezy, CGI.pm V3.52 is part of system Perl (5.14), and there's also a package libcgi-pm-perl for Wheezy with version 3.61. In Debian Jessie, there's no CGI in Perl 5.24, but there's still the Debian package libcgi-pm-perl, now version 4.35. You might need to install that package after upgrading.

If you use CGI qw(:standard), then there's not much to fear, it is just the :any tag which is no longer available. A notable change is that if you call the param() method in list context, you get a warning: So many programmers have been bitten by failing to do this correctly, so now you get the warning even if you know what you're doing. If you deliberately chose to call param() in list context, you can suppress this warning by setting $CGI::LIST_CONTEXT_WARN=0.

You need to do something if you used the internal module structure of the CGI package, e.g. the Fh package, which no longer exists, and you might eventually need to do something if you are using the CGI::Pretty module.

So, if the task at hand is upgrading from Wheezy to Stretch then I suggest to just go ahead and leave your CGI applications as they are.


In reply to Re: Replacing CGI.pm by haj
in thread Replacing CGI.pm by horace

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 20:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found