http://qs321.pair.com?node_id=854778


in reply to Are all .cgi helper modules unfit for http methods common in REST?

I haven't drunken a lot of REST Kool-Aid, but i know enough to know that REST != CGI. REST isn't a subset or a superset of CGI for that matter. They are largely orthogonal concepts, overlapping only in as much as they both use HTTP for transport.

Note in particular that RFC 3875 specifically identifies only 3 valid HTTP Methods for CGI (HEAD, GET, and POST). Quite simply: if a CGI related Perl module is moderately useful for writing REST resources, that's a perk above and beyond the scope of it's primary function as a CGI library. Complaining that it doesn't support everything you need to implement a REST resource is like complaining that an XML Parsing module doesn't support everything you need to parse crufty HTML found in the wild.

Have you perchance considered using REST::Resource or REST::Application?

  • Comment on Re: Are all .cgi helper modules unfit for http methods common in REST?

Replies are listed 'Best First'.
Re^2: Are all .cgi helper modules unfit for http methods common in REST?
by isync (Hermit) on Aug 13, 2010 at 09:51 UTC
    That was a good hint!

    I was too centered on this CGI::Application / (it can do anything, so why not provide a REST API) idea that I didn't realize it might make sense to look around cpan in the REST namespace... Thanks!

    (interesting, REST::Application is built around CGI.pm.., I'll see how this behaves.. see above 'keywords' observation)