<%init>
my $currentUser = Apache2::SiteControl::AccessController::getCurrentUser($r);
my $manager = Apache2::SiteControl::AccessController::getPermissionManager($r);
# This would be where you would access your back-end data store to get
# data...we will simulate this will literals and submitted data:
my $preferences = { favoriteColor => 'Red', age => 20 };
$preferences->{favoriteColor} = $color if($color ne "");
$preferences->{age} = $age if($age != 0);
%init>
<%once>
sub colorList($)
{
my $prefs = shift;
my $result = "";
for my $color ("Red", "Green", "Blue", "Purple", "Pink")
{
if($color eq $prefs->{favoriteColor}) {
$result .= "