TIMTOWTRI: There is more than one way to run it.

Being a rather Internet, browser-centric kind of guy, I recently began creating HTML/CGI GUIs for useful Perl programs. I've got a master index.html page with links to HTML forms acting as front ends to Perl programs on my server. I can get around a command line but passing arguments to a program via text boxes seems easier and more natural for me. This is especially true when I've got a chunk of HTML I want to process.

I'm just curious to know if this is common practice in the Perl community. How do you run Perl?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff";
$nysus = $PM . $MCF;
Click here if you love Perl Monks

update (broquaint): title change s/Broswer/Browser/

Replies are listed 'Best First'.
(jeffa) Re: Broswer as a Perl GUI?
by jeffa (Bishop) on Jul 13, 2003 at 12:52 UTC
    Mostly on the command line (via a shell). Call me old-fashioned, but that's the easiest way for me to process stuff. Don't get me wrong, i too create GUI's that use CGI (well ... mod_perl) and a browser ... that's a beautiful gift from the internet: a "universal app server". But i must say that creating a front end via the web to some Perl scripts seems a bit overkill, especially when you already have one - the command line. If you haven't already bought it, go get a copy of Data Munging With Perl. In it, davorg details how to set up 'pipelines' for command line scripts. Very useful stuff!

    And remember, even though you may not be dealing directly with a shell, the webserver is. In essense, by creating web front ends to Perl scripts, you are creating a bypass right back to where you started. This may make sense for a group of users who do not have direct access to the tools on a computer, but for a single coder who already had the access, it can only be best used as an educational tool for that single coder. And there's nothing wrong with that. ;)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Browser as a Perl GUI?
by Juerd (Abbot) on Jul 13, 2003 at 15:31 UTC

    Broswer as a Perl GUI?

    It's my favourite GUI. Besides the standard Apache+mod_perl approach, I use the browser as GUI in some stand-alone applications. HTTP::Daemon and POE::Component::HTTP::Server make this not only possible, but also very easy.

    The nice thing about this is that it is extremely portable. Sure, wxWindows works on several platforms, and Tk works on even more. But HTML works well even in text browsers.

    But I still like developing Internet-based applications more than stand-alone applications. They're easier to maintain, and users can't complain about bugs in old versions, because the old versions simply aren't there anymore.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Re: Browser as a Perl GUI?
by Albannach (Monsignor) on Jul 13, 2003 at 13:30 UTC
    I too do the vast majority of my Perl work from the command line, with the occasional Tk interface. It may just be an age thing as I'd much rather use punched cards - you can really feel your code then!

    One thing that I've always liked about browsers (and not just for Perl either) is the free printing engine. You can fill in the input form, print that, press the button, and then print the output, and the preview is also handy. If you need those features, it's certainly not ideal, but it is faster and cheaper than rolling your own.

    ("broswer?" ;-)

    --
    I'd like to be able to assign to an luser

Re: Browser as a Perl GUI?
by Abigail-II (Bishop) on Jul 13, 2003 at 22:15 UTC
    I really loathe writing "Internet Applications". The request/reply HTTP protocol just plain sucks as a user interface, IMO. Whenever I do (luckely, I do that very seldomly), I find myself spending too much time checking input and creating feedback if something was wrong.

    I prefer the command line, which also means it can be easily called from cron. I do write programs that generate HTML - that I don't mind, but I find it far easier to deal with user input when writing CLI programs than web based applications. But in some cases a GUI is preferred, in which case I use Perl/Tk.

    Abigail

      ...I really loathe writing "Internet Applications"...

      It is horrible. Nobody will choose an HTML UI over a desktop one, for reasons of usability or ease of development. They do it (maybe 1 to 100 desktop vs. HTML apps) because of deployment. Rui tries to provide the best of both worlds.

Re: Browser as a Perl GUI?
by Courage (Parson) on Jul 14, 2003 at 06:32 UTC
    I run perl using my special script named "runperl.pl" that will ease searching my own scripts where I usually place them.
    Additionally that script allows to specify "--deb" option and required script will be called with "-d:ptkdb" option and will allow to do step-by-step debugging.

    I use perlTk and Tcl::Tk as GUI, also I used to embed perl into my GUI programs with GUI provided by C++ Builder, but time passes and I refused to go that way nowadays.

    There is a plenty of GUI engines that are available for Perl, and wxWindows, perlQt are only few of them, because perl has interconnection with really many systems (you can connect to Java and use it's GUI for example).

    Courage, the Cowardly Dog