#!/usr/bin/perl /usr/bin/asp-perl <% # process user login my $error; my $user = $Form->{'user'}; if(defined $user) { $user =~ /^\w+$/ or $error = "Your username must made of only letter and numbers"; length($user) > 3 or $error = "Your username much be at least 4 character long"; unless($error) { $Session->{user} = $user; $Response->Redirect('bookmarks.asp'); } } $user ||= $Session->{user}; %> Hello, and welcome to the MyBookmarks Apache::ASP demo application. To begin your bookmark experience, please login now:
<% if($error) { %>

* <%=$error%> <% } %>

method=POST>
This demo makes use of the Apache::ASP objects, especially $Session and $Response, modularizes html via SSI file includes, and uses the Script_OnStart and Script_OnEnd event hooks to simplify common tasks done for each script in this web application.