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

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
  • Comment on Re^9: Making Perl Monks a better place for newbies (and others)

Replies are listed 'Best First'.
Re^10: Making Perl Monks a better place for newbies (and others)
by PerlGuy(Tom) (Acolyte) on Feb 02, 2020 at 08:46 UTC
    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.

        So why haven't you written it yet?

        I'm serious. If someone wrote a replacement site which managed to capture the nuances of policy we have here -- since we believe it's what has, more than anything else, made PerlMonks successful -- then we could, without a whole lot of effort, port the database of posts, etc. to the new platform. Or we could do something reasonable, like "shadow" them. Anything's possible. But before that can happen, someone needs to implement PerlMonks 2.0.

        I probably shouldn't argue with someone with 1,000 times more "experience", but I've had about 99% of my questions about Perl programming answered here, over the years, but almost never posting, just because it always comes up in an Internet search. Navigating the threads I get lost though. -- Tom
          A reply falls below the community's threshold of quality. You may see it by logging in.
      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...

        Actually most of the examples I see posted here have use CGI; shortly followed by printing the content type and ignoring the header method. I find Mojolicious both to be intuitive, and very fun to work with.

        You misspelled more secure, flexible, correct, extensible, and robust. And your CGI-fu is…

        print CGI->header; # …is just fine.

        CGI.pm/cgi-lib.pl may have given the web to Perl, for all of like five years, but it is also what took the web away from Perl. Vanilla CGI was untenable as an app deployment layer, especially in shared hosting environments, and mod_perl was too difficult and hardwired to the webserver, trebly in shared hosting environments. There is a difference between negativity and objectivity.

      A reply falls below the community's threshold of quality. You may see it by logging in.
        It would be helpful to disclose what point you're trying to make with all those references.

        As, reading them, diverse points of view are represented and solutions proposed

        You could be doing anything from criticising my spelling or excess use of br for line breaks, to pointing out that formatting issues have been a long standing problem.

        Perhaps I should have wrapped the "everything engine" code with code tags?

        I'm sure you have some point to make but it isn't obvious to me.

        Tom