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

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

Replies are listed 'Best First'.
Re^11: Making Perl Monks a better place for newbies (and others)
by Your Mother (Archbishop) on Feb 02, 2020 at 22:08 UTC

    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.

        The initial reason, from years back, is I assumed it would be rejected outright; and it’s just as well, I would have chosen Catalyst and that probably would have been a suboptimal choice these 13ish years later. I went as far as getting a related domain name to do exactly what you suggest, shadow the site as an experiment, and setting up some basics and an outline of reverse engineering. The current reasons include an absolute dearth of remotely circular tuits + analysis paralysis + fear of taking on responsibility I couldn’t handle + distaste for the social aspects of arguing about anything + I’d either be “outing” myself or having to jump through hoops to have a pseudonymous github presence (which I also went as far as setting up). Garnish with I’ve always liked the site okay as is and with tobyink’s skin I like it better and with the ajax voting I put together recently I don’t have any serious friction points.

        If it ever in these threads sounded like I was criticizing you or any other active pmdev, I should clarify the exact opposite is true. I am grateful you take it on and deal with issues. The site is fantastic as an entity and while there are several things that go into that it’s only possible because of you and the others who maintain the code.

        Could you provide pmdevs with a dev version of PM to play with?

        From my understanding it means basically mirroring the DB after purging private data.

        edit

        > managed to capture the nuances of policy we have here

        I think there are more nuances which might need to be "re-implemented" too.

        Like nodelets, tickers, user settings, ...

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        I've certainly written forum programs that are capable of replacing the newline character in received form input with an html equivalent rather than just stripping it out, so have thousands of other forums everywhere across the internet.

        I don't know why anyone would consider having their "return" replaced with space or nothing, a desirable feature.

        I don't think an entire forum platform replacement is necessary just to make a very minor modification to one line of code.

        Tom
      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

        Well, the one is not related to the other. The answers here never involve the code beneath; and the code is not directly related to the layout. I do not denigrate the monastery in the slightest, only remark that web-development in 1998 was not the peak of its evolution. :P

        A reply falls below the community's threshold of quality. You may see it by logging in.
Re^11: Making Perl Monks a better place for newbies (and others)
by Anonymous Monk on Feb 03, 2020 at 18:27 UTC
    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.
Re^11: Making Perl Monks a better place for newbies (and others)
by Anonymous Monk on Feb 02, 2020 at 09:55 UTC
      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