|Perl: the Markov chain saw|
Re: RFC CGI.pm refactoringby little (Curate)
|on Feb 14, 2002 at 21:16 UTC||Need Help??|
I think the discussion goes to a wrong direction.
Wait! I'd like to say why I think so before you kill me. :-)
The documentation for the Common Gateway Interface does not mention the ability of producing a specified _document_ syntax or structure upon browser requests but how to handle browser requests and how to reply to them by giving declarations _about_ the document to be returned, not about its specific content.
Therefore the question is, how all these nice and very usefullfull HTML and now xhtml spitting out functions made it into a module called CGI.pm. Well, I like the way it is, but I dislike the idea of seeing CGI.pm updated twice or thrice a year because of new document syntax, which is not troubling the CGI as an interface at all, except additional mime-types to be declared, well.
To get to the point: _I think_ all functions and methods that do not belong _by definition of the interface_ into CGI.pm should be "deported" to another modul or should be replaced by another modul as there are now plenty of them.
To keep compatibility with older versions, upon 'use CGI;' an additional option might be passed, for example 'use CGI(-noTags);' indicating that I want the plain interface communication handled by CGI.pm and nothing more. If that option is omitted CGI.pm should load all that baggage and overload it is carrying then in other modules as CGI::HTML or CGI::SGML or CGI::XML, which shows that there are already enough modules out there to be a replacement or inplacement for the one or the other.
I just, and this is the main reason why I write this, don't get the idea of having a module named CGI::Simple, even if it is not implementing a simpler version of the CGI but just all of it and having a module called CGI which contains more than its name should allow.
Ok, now you can tell me why you thought you could kill me upon having read the first sentence, if that ever was the case :-)
Have a nice day
All decision is left to your taste
Update15.02.2002 12.15 CET
I just had a closer look again at CGI.pm's POD and I think it was 'use CGI qw/:cgi /;' which was (still is?) supposed to fullfill that. So there would by now not even be a need for "-noTags" or the like.
Which does not change my opinion to better move the "baggage and overload" out of the core CGI.pm to other modules in the CGI:: namespace or link them to other modules.