Hi all,

I've had an idea for an Inline::HTML module that I would like to run by this
list
for comments/ideas. I have a prototypical working implementation.

Of course HTML doesn't have functions. But the way I use it in this context
is
to create a GUI for Perl scripts. Here's an example:

-----8<-----
use Inline HTML => Config =>
    BROWSER => '/usr/bin/netscape' ;

use Inline (HTML => 'DATA') ;

my $name = get_name() ;
print "Hello $name\n" ;

__DATA__

__HTML__
get_name
<HTML>
<BODY>
<FORM METHOD=GET ACTION="return">
Enter your name: <INPUT TYPE=TEXT NAME=name>
<INPUT TYPE=SUBMIT VALUE="Ok">
</FORM>
</BODY>
</HTML>
-----8<-----

This will launch a browser and get the user's name. Then the Perl script can
go on.
You can also call Perl subroutine from the FORM, i.e.
ACTION="My::Module:check_name",
and that function will get the form contents passed as argument.

I could see this being usefull to build wizards and that kind of stuff.

Any comments?

Patrick

-------------------------
Patrick LeBoutillier
Laval, Quebec, Canada

Reply via email to