4 use AnyEvent
::HTTPD
::Appgets
;
5 use CGI qw
/escapeHTML/;
7 my $cvar = AnyEvent
->condvar;
9 my $httpd = AnyEvent
::HTTPD
->new (port
=> 9090);
11 my @list = qw
/Apples <this> Other things/;
15 my ($httpd, $req) = @_;
18 o
"<html><body><h1>Editable list:</h1>";
22 entry
(\
$new_element);
23 o
'<input type="submit" value="append"/>'
25 push @list, $new_element;
29 for my $cur (sort @list) {
31 my $lnk = $req->link ("[delete]", sub { @list = grep { $c ne $_ } @list; });
32 o
"<li>".escapeHTML
($c)." ".$lnk."</li>";