Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.perl.misc > #8542
| From | Rainer Weikusat <rweikusat@mssgmbh.com> |
|---|---|
| Newsgroups | comp.lang.perl.misc |
| Subject | Re: a-Moose-ing CGI |
| Date | 2013-06-30 14:05 +0100 |
| Message-ID | <87sizz695b.fsf@sapphire.mobileactivedefense.com> (permalink) |
| References | (5 earlier) <87mwqa8isy.fsf@sapphire.mobileactivedefense.com> <8738s273j2.fsf_-_@violet.siamics.net> <87ip0y8gri.fsf@sapphire.mobileactivedefense.com> <87vc4w69wn.fsf@sapphire.mobileactivedefense.com> <87ppv43ubf.fsf_-_@violet.siamics.net> |
Ivan Shmakov <oneingray@gmail.com> writes: >>>>>> Rainer Weikusat <rweikusat@mssgmbh.com> writes: > > [...] > > > OTOH, I can't help thinking that it is a very strange coincidence > > that Moose is positively unusable for CGI programs, provided that > > what is reported about the time needed to compile it is correct (or - > > for that matter - for anything which isn't 'a long-running > > application' [*]) and that outspoken proponents of it want to make it > > more difficult for people to write CGI programs by removing CGI.pm > > from the Perl distribution. > > CGI.pm appears to mix up CGI support and HTML generation, which > is a thing I see no good reason to do. The 'good reason' would be that CGI programs usually both consume input and produce output. While I'm not particularly fond of the HTML generation support in CGI.pm, the basic idea of generating HTML using a procedural interface has something going for it: In this way, it possible to use a 'high-level interface' whose parts represent the logical structure of a form. This makes modifications of this logical structure much easier than when having to deal with some kind of proto-HTML markup language with an HTML-like syntax and some typically fairy 'dumb' (insofar programmbility goes) support for value interpolation. 'Circumstances' forced me to get some first-hand experiences with JSF and RichFaces and the 'template pages' generated in this way are generally huge, repetitive angle bracket swamps. I understand that 'the typical programmer' never uses a loop (or - heaven forbid - a subroutine) when he can just copy'n'paste identical code fifteen times in a row (and thus minimize the amount of work needed for each of the slightly different fifteen individual cases) but the result of this is an unwieldy and rigid structure which reminds me of a frozen rubbish heap (extended by throwing more stuff onto it and waiting for it to freeze but never modified in any other way as this would be prohibitively expensive). > So, I tend to advocate > in favor of replacing it with CGI::Simple whenever possible. > (My Web pages are generated with XML::LibXML::toFH (), > anyway.) I've had a look at that. A missing feature I absolutely need jumped at me immediately: Support for accessing uploaded file data without creating a temporary file first. Neither CGI.pm not CGI::Simple seem to be 'maintained' in the sense that anybody bothers to deal with CPAN bug reports, however, this here https://rt.cpan.org/Public/Bug/Display.html?id=64160 is an absolute showstopper for me: I have to humour people with a seriously high level of professional paranoia (yes, I do mean that) and 'open CVEs' are ratpoison in this respect. I can, of course, maintain the code myself but I could as well just write it myself and the result would very likely be less buggy and perform better for my use cases. > Moreover, thanks to Fast CGI (and FCGI.pm), it's possible to > serve multiple HTTP requests without restarting the CGI code. ... 'we can just write a long-running application instead' ... well, yes. I've also done that in the past, although based on mod_perl (the mod_perl I have even behaves like its documentation says it should because I forced it to ...). But if I can get by with the more 'UNIX(*)-style' approach of using relatively small, independent cooperating processes, I prefer to do that. Maybe because I'm old enough that my first impression of this world wasn't the 'designed for Windows 98' logo but young enough to feel no haste to chase whatever happens to be modern now because it happens to be modern now (lest I could be ... left behind !!1) but so be it. > And, it may also allow for more flexible privilege separation > (than mod_suexec, anyway.) Being able to switch UIDs on UNIX(*) means 'running with elevated privileges' and if I don't absolutely have to use some 'huge' piece of software for that whose innards are essentially unknown to me, I prefer to avoid that. And this means small, setuid-0 C programs which don't perform any function except 'uid switching', usually, to a hard-coded persona, and only executable by the user supposed to execute them.
Back to comp.lang.perl.misc | Previous | Next — Previous in thread | Next in thread | Find similar
CPAN vs. POD outside of .pm (.pl) files? Ivan Shmakov <oneingray@gmail.com> - 2013-06-17 14:20 +0000
Re: CPAN vs. POD outside of .pm (.pl) files? Ben Morrow <ben@morrow.me.uk> - 2013-06-17 16:12 +0100
Re: CPAN vs. POD outside of .pm (.pl) files? Ivan Shmakov <oneingray@gmail.com> - 2013-06-17 15:39 +0000
Re: CPAN vs. POD outside of .pm (.pl) files? Ben Morrow <ben@morrow.me.uk> - 2013-06-17 21:03 +0100
Re: CPAN vs. POD outside of .pm (.pl) files? Ivan Shmakov <oneingray@gmail.com> - 2013-06-27 05:42 +0000
Re: CPAN vs. POD outside of .pm (.pl) files? Ben Morrow <ben@morrow.me.uk> - 2013-06-27 08:12 +0100
issues with POD Ivan Shmakov <oneingray@gmail.com> - 2013-06-27 08:50 +0000
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-06-27 12:32 +0100
Re: issues with POD Ivan Shmakov <oneingray@gmail.com> - 2013-06-27 12:48 +0000
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-06-27 14:53 +0100
$ pod2man --quotes= Ivan Shmakov <oneingray@gmail.com> - 2013-06-27 15:20 +0000
Re: issues with POD Ivan Shmakov <oneingray@gmail.com> - 2013-06-27 15:25 +0000
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-06-27 22:21 +0100
[OT] PostScript Ivan Shmakov <oneingray@gmail.com> - 2013-06-28 11:58 +0000
Re: issues with POD Ivan Shmakov <oneingray@gmail.com> - 2013-06-28 12:04 +0000
Re: issues with POD Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-06-30 08:37 -0400
Re: issues with POD Ivan Shmakov <oneingray@gmail.com> - 2013-06-30 17:57 +0000
Re: issues with POD Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-01 17:38 -0400
Re: issues with POD Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-30 19:44 +0100
Re: issues with POD Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-28 14:29 +0100
[OT] non-issues with non-solutions Ivan Shmakov <oneingray@gmail.com> - 2013-06-28 13:45 +0000
Re: [OT] non-issues with non-solutions Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-28 15:13 +0100
Re: [OT] non-issues with non-solutions Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-29 19:37 +0100
a-Moose-ing CGI Ivan Shmakov <oneingray@gmail.com> - 2013-06-30 07:56 +0000
Re: a-Moose-ing CGI Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-30 14:05 +0100
Re: a-Moose-ing CGI Ben Morrow <ben@morrow.me.uk> - 2013-07-01 13:26 +0100
Re: a-Moose-ing CGI Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-01 18:12 +0100
[OT] CGI: "Fast" vs. "classic" Ivan Shmakov <oneingray@gmail.com> - 2013-07-01 17:27 +0000
Re: [OT] CGI: "Fast" vs. "classic" Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-01 18:45 +0100
Re: a-Moose-ing CGI Ben Morrow <ben@morrow.me.uk> - 2013-07-01 18:52 +0100
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-07-01 13:29 +0100
Re: issues with POD "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2013-07-01 17:19 +0200
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-07-01 18:38 +0100
Re: issues with POD Mart van de Wege <mvdwege@mail.com> - 2013-07-02 10:13 +0200
Re: issues with POD "Dave Saville" <dave@invalid.invalid> - 2013-07-02 08:54 +0000
Re: issues with POD Ben Morrow <ben@morrow.me.uk> - 2013-07-02 11:42 +0100
perldoc and perl-doc Ivan Shmakov <oneingray@gmail.com> - 2013-07-02 11:17 +0000
Re: perldoc and perl-doc Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-02 12:37 +0100
Re: perldoc and perl-doc Ivan Shmakov <oneingray@gmail.com> - 2013-07-02 14:34 +0000
Re: perldoc and perl-doc Jürgen Exner <jurgenex@hotmail.com> - 2013-07-02 08:18 -0700
Re: perldoc and perl-doc Ivan Shmakov <oneingray@gmail.com> - 2013-07-02 15:23 +0000
Re: perldoc and perl-doc Eric Pozharski <whynot@pozharski.name> - 2013-07-03 09:41 +0300
Re: perldoc and perl-doc "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2013-07-02 17:38 +0200
Re: perldoc and perl-doc Ben Morrow <ben@morrow.me.uk> - 2013-07-02 16:37 +0100
Re: perldoc and perl-doc Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-02 17:20 +0100
Re: perldoc and perl-doc Charlton Wilbur <cwilbur@chromatico.net> - 2013-07-02 12:08 -0400
[OT] MIME adoption in Usenet Ivan Shmakov <oneingray@gmail.com> - 2013-07-03 12:59 +0000
Re: [OT] MIME adoption in Usenet Ben Morrow <ben@morrow.me.uk> - 2013-07-03 17:49 +0100
Re: issues with POD tmcd@panix.com (Tim McDaniel) - 2013-06-27 18:43 +0000
csiph-web