<& lib/hourglass.m, op => "show" &> % my $dir = $m->current_comp->source_dir; % opendir(DIR, $dir) or die "Unable to read directory \"$dir\": $!\n"; % while (my $filename = readdir(DIR)) { % next if ($filename =~ /^\./ || $filename =~ /~$/ || $filename =~ /^(index.html|lib|autohandler)$/); % my $entry = $m->fetch_comp($filename) or next; % next if ($entry->attr_exists('requires_mod_perl') && !$m->isa("HTML::Mason::Request::ApacheHandler"));
  • <%$filename%> <% $entry->attr_exists("title") ? $entry->attr("title") : "" |h%> % } % closedir(DIR);
  • <& lib/hourglass.m, op => "hide" &> <%attr> title => "Index"