Apache-SiteControl

 view release on metacpan or  search on metacpan

sample/site/index.html  view on Meta::CPAN

my $manager = Apache::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 };
</%init>

<%once>
sub colorList($)
{
   my $prefs = shift;
   my $result = "";

   for my $color ("Red", "Green", "Blue", "Purple", "Pink")
   {
      if($color eq $prefs->{"favoriteColor"}) {
         $result .= "<OPTION SELECTED>$color\n";
      } else {
         $result .= "<OPTION>$color\n";
      }
   }
   return $result;
}
</%once>



( run in 1.330 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )