[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] CGI::Application::Light 0.1


Hello,

I just thought I would drop a note regarding a spin-off of
CGI::Application I wrote a few months ago (and just now got around to
adding some documentation to).  Essentially it strips out a lot of what
I considered unnecessary for my simple purposes.  Perhaps one of the
largest changes is decoupling CGI::Application from HTML::Template.

I realize that Jesse and Sam have a good relationship; however, I always
felt that when I'm using Template::Toolkit it was a hack around the
goodness that is CGI::Application.  Rather than write a patch to support
both, I opted for the cleaner segregation of the two.  (I'm all for a
CGI::Application::HT or CGI::Application::TT module that subclasses and
adds the corresponding template infrastructure to it, though)

In the way of other big changes... there is no start_mode() subroutine,
the 'application interface' was changed to simply initialize(),
prerun(), "Your runmode here", postrun(), teardown().  The modes()
subroutine is compatible with both the brand-new arrayref, and older
hash-style dispatch table syntax, but it is called modes(), not
run_modes().  There is no flexible header_props or header_type, rather
you just call redirect($uri) if you want it to do a redirect and/or
cookie('name' => 'value'), if you want it to set a cookie.

The other large change was using my own CGI::Light for the parameter
work.  CGI::Light just takes the bare essentials from CGI::Simple and
CGI.pm so that you can retrieve query string data via the param()
interface, and cookie data via the cookie() one.  It doesn't do headers,
html generation, or anything else.

I wrote these modules because I am writing a rather large site
infrastructure that will be running under non mod_perl blessed hosts. 
So speed and rigidity are my friends in this case.  I have no intention
of competing with CGI::Application ( to which I'm extremely grateful for
the amount of Good Practices (tm) it (and this list) have taught me ),
and I'm merely posting to either a) find out if anyone even needs/cares
about this, and b) (hopefully) contribute something useful to this list.

Without further ado, 

http://perl.l8nite.net/modules/CGI/Application/Light.html
http://perl.l8nite.net/modules/CGI/Application/Light.pm
http://perl.l8nite.net/modules/CGI/Light.pm

And I also did up a quick set of benchmarks on a pathetically minimal
application:

http://perl.l8nite.net/modules/CGI/Application/benchmarks.html


/me dons his flame-retardant underwear...,

Shaun Guth
suppressed

P.S.. Thanks for letting me spam your list Jesse! :x

Attachment: signature.asc
Description: This is a digitally signed message part

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.