in reply to Re^7: Making Perl Monks a better place for newbies (and others)
in thread Making Perl Monks a better place for newbies (and others)

Its got nothing to do with that
  • Comment on Re^8: Making Perl Monks a better place for newbies (and others)

Replies are listed 'Best First'.
Re^9: Making Perl Monks a better place for newbies (and others)
by PerlGuy(Tom) (Acolyte) on Feb 01, 2020 at 20:03 UTC
    With what?

    Or/and: What does it have to do with?

    I've written some basic message board programs, going back to the 90's. I would think not having basic functionality, such as rendering basic text with paragraphs,, would be intolerable.

    I can live with it I guess, I'm just puzzled why we have to, or why anyone would want to.

    Tom
      I downloaded all the Everything Engine files from SourceForge and poked around a bit.

      I opened up first what appears to be the most recent build available.

      It contains:

      package Everything::HTML; ###################################################################### +####### # # Everything::HTML.pm # # Copyright 1999,2000 Everything Development Company # # A module for the HTML stuff in Everything. This # takes care of CGI, cookies, and the basic HTML # front end. # ###################################################################### +####### use strict; use Everything; use Everything::MAIL; use CGI; use CGI::Carp qw(fatalsToBrowser);

      I, of course, have no way of knowing if this has been changed or updated on PerlMonks to use something other than CGI.pm but the majority of older Perl programs did. Apparently the Everything Engine is no different.

      I never did like CGI.pm. Too bloated for the simple message board scripts I wrote.

      Also I wanted more control. It was easier just to write my own code from scratch for that.

      But, if it is still what PerlMonks has running on the back-end for handling CGI, some scripts,
      possibly some versions of CGI.pm use something like $value =~ s/\n/ /g; replacing the newline character with whitespace, globally. So instead of converting to HTML the return is converted to a space.

      Instead, do something like $value =~ s/\n/<br \/>\n/g;

      Tom

        For my part, the Everything Engine is an interesting stab at forum code that is, at its root, antiquated, awful, untenable nonsense. I *revere* those who make it work here and *any* code can run a website. I would yank on the handle hard enough to break the chain if I thought we could flush it and move to a modern framework.

        I, of course, have no way of knowing if this has been changed or updated on PerlMonks to use something other than CGI.pm but the majority of older Perl programs did. Apparently the Everything Engine is no different.

        I never did like CGI.pm.

        I never did understand the negativity around CGI.pm. It's very easy to use and gets the job done. When projects needed to scale people would simply preload CGI.pm into memory and port their scripts to persistent mod_perl handlers. CGI was the most celebrated Perl module for many years and almost single-handedly propelled Perl to be the main programming language for building web infrastructure. Almost, because, before CGI.pm there were years of productivity enabled by something called cgi-lib.pl: https://cgi-lib.berkeley.edu/

        Of course when CGI.pm came along it was encouraged and the previously popular way of getting the job done right was discouraged.

        I know what is wrong with CGI.pm, and I also know what is right, but I don't understand throwing out the baby with the bathwater, when the baby was laying golden eggs (all those web frameworks sitting on CPAN, built by people who started on core CGI).

        Before CGI.pm a perl web application looked like this:

        print "Content-type: text/html\n\n";
        After CGI.pm got all object-oriented it went like:
        use CGI; my $q = CGI->new; print $q->header;
        After CGI.pm fell out of favor this is a preferred method:
        use Mojolicious::Lite; get '/' => sub { my $c = shift; $c->render(text => '') }; app->start;
        Clearly things have gotten more abstract and less intuitive...
        A reply falls below the community's threshold of quality. You may see it by logging in.