This is a sample page.

Logout

% if($manager->can($currentUser, "edit", $preferences)) {
Name:<% $currentUser %>
Favorite color:
Age: ">

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