CLI, CGI

2 views
Skip to first unread message

Terrence Brannon

unread,
Sep 21, 2009, 4:55:25 AM9/21/09
to squatting-framework
How different should a CGI app look from a Command-Line (CLI) app? I was
looking at this framework for separating core computation from a script
interface <http://search.cpan.org/~kerisman/CLI-Framework-0.03/> and
began to wonder how easy/important it would be to have a CGI interface
available as well.

One thing that logic/functional languages do automatically is separate
source of input from computation. It's much harder to interleave
computation and its display in such languages, thereby making the need
for a generic tool to dispatch to CGI or CLI necessary.

Then again, that interspersal is sometimes useful - if you have a huge
file to spit back via HTTP that is computed on the fly, you dont want to
wait for all computation to occur before the output phase...

Brock

unread,
Sep 21, 2009, 9:28:55 AM9/21/09
to squatting...@googlegroups.com
I had thought about doing Continuity::Adapt::CLI some time ago, but
never did :)

Biggest problem I ran into was that too much code in my sample app
assumed HTML output, and I wasn't up to the task of changing that. Cool
idea though to have a CLI interface to everything... along the same
lines would be a REST-ish interface.

--Brock
Reply all
Reply to author
Forward
0 new messages