On Tue, 25 Mar 2003, Stas Bekman wrote: > Lincoln Stein wrote: > >>How about making CGI.pm a subclass of $r? (optionally of course, by > >>dynamically changing @ISA), so instead of returning $q it'll return $r, > >>after re-blessing it. > > > > > > Sounds interesting. What would be the advantage of that? > > The advantage is that > - you don't have to keep around two instances: $r and $q. > - assuming that CGI.pm-specific code is not used one can transparently switch > between Apache::Request and CGI.pm, by just changing: > > $r = Apache::Request->new($r); > $r = CGI->new($r); > > And of course Apache::Request is a subclass of Apache ($r) and it works pretty > well. > > In the future I can see someone extending Apache::Request to handle CGI.pm's > HTML generation in C, so the two could be replace each other.
I sure hope not! I second John Siracusa's post on this. Keep the HTML generation well away from request parsing, please! - nick -- ~~~~~~~~~~~~~~~~~~~~ Nick Tonkin {|8^)>