Re: Lightweight CGI.pm for PerlHandlers
On Fri, 18 May 2001 23:28:06 -0400, Neil Conway wrote: I'd like to be able to use something similar to CGI.pm's HTML generation methods in a PerlHandler I'm writing. Since I'm not ever going to be using CGI directly (and also, the HTML I'm doing is pretty simple), CGI.pm seems like overkill -- and from looking at some basic memory usage data, it seems like you pay for this complexity/flexibility. Is there a simple (fast, light) module that generates HTML in a similar style to CGI.pm, for use with mod_perl? If you just care about CGI.pm's stickiness, my HTML::StickyForms module in combination with Apache::Request will generate form elements. You'll have to do the other elements yourself, though. -- Peter Haworth [EMAIL PROTECTED] This seems dangerously close to COBOL, something difficult to argue in favor of. -- Tom Christiansen
Re: Lightweight CGI.pm for PerlHandlers
On Fri, May 18, 2001 at 11:28:06PM -0400, Neil Conway wrote: Is there a simple (fast, light) module that generates HTML in a similar style to CGI.pm, for use with mod_perl? You can check out HTML::EasyTags[1] and HTML::TagMaker[2]. They're all kinda heavyweight, the first requires OO ($html-table()) either in the API or inside of functional wrappers (IIRC), or passing of tags into and out of wrapper functions, kinda like so: print table( -align = center, tr( td( foo ), td( bar ), ), ) ; I think there's a need (or at last I haven't found a package) that provides a simple, functional, non-nested (ie lightweight) set like so: print table( -align = center ), tr, td( foo ), td( bar ), _tr, _table ; - Barrie [1] http://search.cpan.org/doc/DUNCAND/HTML-EasyTags-1.05/EasyTags.pm [2] http://search.cpan.org/doc/SKUD/CGI-FormMagick-0.4.0/lib/CGI/FormMagick/TagMaker.pm
Re: Lightweight CGI.pm for PerlHandlers
At 11:28 PM 05/18/01 -0400, Neil Conway wrote: Is there a simple (fast, light) module that generates HTML in a similar style to CGI.pm, for use with mod_perl? Well, not in the style similar to CGI.pm, but how about a here doc -- if it's that simple. At the moment, I'd rather not move to a system like HTML::Mason or Template Toolkit -- the HTML I'm producing is very simple (in fact, I've just been using $r-print up to now, and it's not _too_ bad). I bounce between HTML::Template, Template-Toolkit, and here docs. Frankly, mostly I use HTML::Templace for even really simple things (I use a here doc for the template). This kind of thing is personal style, but I think the templates make the HTML stuff easier (and hidden away). One of my New Years Resolutions was to do everything in Template-Toolkit so I'd learn it better. (But I'm also not drinking less beer, windsurfing more, working less, or having more, eh, sleep, either.) Bill Moseley mailto:[EMAIL PROTECTED]
Lightweight CGI.pm for PerlHandlers
Hi all, I'd like to be able to use something similar to CGI.pm's HTML generation methods in a PerlHandler I'm writing. Since I'm not ever going to be using CGI directly (and also, the HTML I'm doing is pretty simple), CGI.pm seems like overkill -- and from looking at some basic memory usage data, it seems like you pay for this complexity/flexibility. Is there a simple (fast, light) module that generates HTML in a similar style to CGI.pm, for use with mod_perl? At the moment, I'd rather not move to a system like HTML::Mason or Template Toolkit -- the HTML I'm producing is very simple (in fact, I've just been using $r-print up to now, and it's not _too_ bad). Thanks for any suggestions, Neil