\n ";
if ($stash->get(['has_bits', 0, 'size', 0])) {
$output .= "\n You have the following permission bits set on your account:\n ";
# FOREACH
do {
my ($value, $error, $oldloop);
my $list = $stash->get('has_bits');
unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
$list = Template::Config->iterator($list)
|| die $Template::Config::ERROR, "\n";
}
($value, $error) = $list->get_first();
eval { $oldloop = $stash->get('loop') };
$stash->set('loop', $list);
eval {
LOOP: while (! $error) {
$stash->{'bit_description'} = $value;
$output .= "\n - ";
$output .= $stash->get('bit_description');
$output .= "
";;
($value, $error) = $list->get_next();
}
};
$stash->set('loop', $oldloop);
die $@ if $@;
$error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
die $error if $error;
};
$output .= "\n ";
}
else {
$output .= "\n There are no permission bits set on your account.";
}
$output .= "\n";
if ($stash->get(['set_bits', 0, 'size', 0])) {
$output .= "\n And you can turn on or off the following bits for\n other users:\n \n ";
# FOREACH
do {
my ($value, $error, $oldloop);
my $list = $stash->get('set_bits');
unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
$list = Template::Config->iterator($list)
|| die $Template::Config::ERROR, "\n";
}
($value, $error) = $list->get_first();
eval { $oldloop = $stash->get('loop') };
$stash->set('loop', $list);
eval {
LOOP: while (! $error) {
$stash->{'bit_description'} = $value;
$output .= "\n - ";
$output .= $stash->get('bit_description');
$output .= "
";;
($value, $error) = $list->get_next();
}
};
$stash->set('loop', $oldloop);
die $@ if $@;
$error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
die $error if $error;
};
$output .= "\n \n ";
}
$output .= "\n | \n
\n