Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Saturday December 26 2015, @12:11PM   Printer-friendly
from the end-of-lifing-software-is-hard dept.

CGI.pm has been removed from the core Perl distribution. From 5.22, it is no longer included in a standard Perl installation.

There are good technical reasons for this. CGI is a dying technology. In 2015, there are far better ways to write web applications in Perl. We don't want to be seen to encourage the use of a technology which no-one should be using.

This does lead to a small problem for us though. There are plenty of web hosting providers out there who don't have particularly strong Perl support. They will advertise that they support Perl, but that's just because they know that Perl comes as a standard part of the operating system that they run on their servers. They won't do anything to change their installation in any way. Neither you nor I would use a hosting company that works like that – but plenty of people do.

The problem comes when these companies start to deploy an operating system that includes Perl 5.22. All of a sudden, those companies will stop including CGI.pm on their servers. And while we don't want to encourage people to use CGI.pm (or, indeed, the CGI protocol itself) we need to accept that there are thousands of sites out there that have been happily using software based on CGI.pm for years and the owners of these sites will at some point change hosting providers or upgrade their service plan and end up on a server that has Perl 5.22 and doesn't have CGI.pm. And their software will break.


What say you, fellow Soylents? How would you suggest "end-of-life"ing CGI.bin?

Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by mendax on Saturday December 26 2015, @01:42PM

    by mendax (2840) on Saturday December 26 2015, @01:42PM (#281179)

    This may have ramifications on us Soylentils thanks to the web app's Perl codebase. Time for a rewrite in something modern? Groovy and Grails anyone? Let the flames begin.

    --
    It's really quite a simple choice: Life, Death, or Los Angeles.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 3, Insightful) by mendax on Saturday December 26 2015, @01:45PM

    by mendax (2840) on Saturday December 26 2015, @01:45PM (#281181)

    Of course, this posting may just demonstrate how little I know about (or really care for) Perl.

    --
    It's really quite a simple choice: Life, Death, or Los Angeles.
    • (Score: 2) by jdavidb on Sunday December 27 2015, @02:06AM

      by jdavidb (5690) on Sunday December 27 2015, @02:06AM (#281345) Homepage Journal
      Rehash doesn't use CGI.pm as far as I know. This is one library from the standard Perl distribution that has been removed. Rehash and Slashcode are seriously higher powered compared to the CGI interface - most commercial hosting providers can't let you run this software because you need to be able to install modules into the server like mod_perl. CGI would work most everywhere but a lot more fancier stuff is going on under the hood in a mod_perl app that can't be done everywhere.
      --
      ⓋⒶ☮✝🕊 Secession is the right of all sentient beings
      • (Score: 2) by The Mighty Buzzard on Sunday December 27 2015, @02:41AM

        by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Sunday December 27 2015, @02:41AM (#281351) Homepage Journal

        What he said. We're straight up mod_perl. Much snazzier than CGI.pm.

        --
        My rights don't end where your fear begins.
        • (Score: 2) by jdavidb on Sunday December 27 2015, @02:46AM

          by jdavidb (5690) on Sunday December 27 2015, @02:46AM (#281354) Homepage Journal
          From my point of view as a Perl programmer back in the day, the mod_perl stuff is heavy wizardry compared to CGI. :) I probably could have learned it, but never got around to it, so it has an air of mysticism to me.
          --
          ⓋⒶ☮✝🕊 Secession is the right of all sentient beings
  • (Score: 0) by Anonymous Coward on Saturday December 26 2015, @03:49PM

    by Anonymous Coward on Saturday December 26 2015, @03:49PM (#281209)

    Everyone knows Go is the language of the future!

    • (Score: 2) by Nerdfest on Saturday December 26 2015, @04:30PM

      by Nerdfest (80) on Saturday December 26 2015, @04:30PM (#281219)

      Go is pretty nice, but if you want a nicer low-ish level language, check out Rust. Both are too low level for something like a web service though, I think. I'm actually pretty impressed with Groovy and would use it over Java in pretty much all situations, although I haven't got into the Java 8 features much yet. From what I've seen though, Groovy does most of the same things as the Java 8 features better.

      Obviously just opinions of course.

      • (Score: 2) by HiThere on Saturday December 26 2015, @08:26PM

        by HiThere (866) Subscriber Badge on Saturday December 26 2015, @08:26PM (#281269) Journal

        That's not the use case for Perl. Awk would be closer, but is missing many of Perl's features. Perhaps you could do it in bash, but that would limit your coverage to Linux. Perhaps Ruby is the closest replacement, but that, also, is designed for a much different use case.

        It's hard to think of any single language that could well replace what Perl does. A mix of shell scripting and Ruby would pretty much cover it, though, using shell scripting for part of the job and Ruby for the rest. (Of course some people just use one tool for every job...and many languages are flexible enough that it can be coerced into working with enough effort.)

        --
        Javascript is what you use to allow unknown third parties to run software you have no idea about on your computer.
        • (Score: 0) by Anonymous Coward on Saturday December 26 2015, @09:05PM

          by Anonymous Coward on Saturday December 26 2015, @09:05PM (#281276)

          It's hard to think of any single language that could well replace what Perl does.

          What does Perl do? Be bloated and horrible? No worries, systemd's got you covered.

          Of course some people just use one tool for every job...

          I wonder if those people try to apply that in the real world as well. It's gonna be funny to see them try to build a house with nothing but a Swiss Army knife.

        • (Score: 3, Funny) by Post-Nihilist on Saturday December 26 2015, @10:24PM

          by Post-Nihilist (5672) on Saturday December 26 2015, @10:24PM (#281297)

          You seems to be right
          according to http://langref.org/all-languages/pattern-matching/searching/check-if-a-string-contains-a-match-to-a-regular-expression [langref.org] :
          ruby
           

          puts "ok" if ("abc 123 @#\$" =~ /\d+/)

          perl
           

          print "ok" if ("abc 123 @#\$" =~ m/\d+/)

          groovy
           

          if ('abc 123 @#$' =~ /\d+/) println 'ok'

          python
           

          found = re.search(r'\d+', 'abc 123 @#$')
          if found:
             print 'ok'

          --
          Be like us, be different, be a nihilist!!!
        • (Score: 2, Informative) by requerdanos on Sunday December 27 2015, @07:03AM

          by requerdanos (5997) Subscriber Badge on Sunday December 27 2015, @07:03AM (#281393) Journal

          Perhaps you could do it in bash, but that would limit your coverage to Linux.

          Other advantages and disadvantages aside, I don't think that bash is limited to Linux [stackoverflow.com]...

      • (Score: 2) by Post-Nihilist on Saturday December 26 2015, @10:12PM

        by Post-Nihilist (5672) on Saturday December 26 2015, @10:12PM (#281293)
        Groovy is a great scripting language, it shines were complex bash script would traditionally be used (start the jvm in interpreted mode -Xint when used as a shell scripting language). In bigger project were java is traditionally used, the optional static typing is somewhat problematic. Scala would be a better replacement if it had a myFunction(Type var) syntax instead of the myFunction(var: Type) it use. This should be a minor annoyance but, for some unknown reason, it irritates me so much that I cannot get myself to practice what I read about Scala with the intention of actually using it.
        --
        Be like us, be different, be a nihilist!!!