in reply to Recommendation: CGI for a remote procedure call

So BernieC, do you want a CGI-based solution or prefer alternatives?

  • Comment on Re: Recommendation: CGI for a remote procedure call

Replies are listed 'Best First'.
Re^2: Recommendation: CGI for a remote procedure call
by BernieC (Pilgrim) on Apr 08, 2019 at 18:24 UTC
    I have no problem with alternatives! My only problem was that all of the aternatives in the "old" ALTERNATIVES were all too ambitious. I'll look at mojolicious::Lite and the others mentioned.. It has been more than a decade since I messed with CGI.pm and so I'd have to learn anything that I decided to use.

    I can't tell much about mojolicious::Lite because the docs seem to be focusing it on a subset of mojolicious, and I'm not really interested in learning a big "frameworkd" just so I can use a mini-package that only implements part of it.

    CGI::LITE and CGI::SIMPLE both look like just what I was looking for! The main difference I can see {for my purposes} is that ::SIMPLE includes the calls to set up simple HTML responses. I vaguely remember that I could/did do "my own" HTML responses and it was pretty simple {and mostly I didn't bother with CGI's html-construction stuff}, but I don't remember how any more so I might swing towards ::SIMPLE and let it handle the headers and such.

    Thanks!

      I'm not really interested in learning a big "frameworkd" just so I can use a mini-package that only implements part of it

      That's not really the case here... Mojolicious::Lite is part of the Mojolicious distribution, and instead of only implementing "parts" of the full framework, it just makes the full framework easier to use to write small applications. See Mojolicious::Guides::Tutorial.

      I don't remember how any more so I might swing towards ::SIMPLE and let it handle the headers and such.

      Note that the HTTP headers are quite different from HTML generation, and it's usually a good idea to use a module to handle the HTTP headers. As for HTML generation, you might be interested in HTML::Tiny, as mentioned in CGI::Alternatives, if you want to go that route instead of using a templating engine such as Template::Toolkit.