#use wml::fmt::sdf #use wml::std::grid <: sub get_wml_subject { my ($file) = @_; open(FILE,$file); my $subject = ; close(FILE); return undef if ($subject !~ /.*<\s*subject\s*(.*)\s*>.*/); $subject =~ s/.*<\s*subject\s*(.*)\s*>.*/$1/; $subject =~ s/^"(.*)"$/$1/; $subject =~ s/^'(.*)'$/$1/; return $subject; } sub add_wml_menu_entry { my ($dir,$style,$order) = @_; my $file ="$dir/index.wml"; my $subj = get_wml_subject($file); if (defined $subj) { if ($order) { print "
  • $subj
  • \n"; } else { print "
  • $subj
  • \n"; } } } sub get_wml_subdirectories { my ($dir) = @_; opendir(DIR,$dir); my (@dir) = grep(!/^\./ && -d "$dir/$_" && !/CVS/ && ! -l "$dir/$_", readdir(DIR)); closedir(DIR); return @dir; } :> {#SUBJECT_LOC#} {#HEADER#}
    A picture of Blaise Gassend
    {#SUBJECT_LOC#}
    {#BODY#}
    {#SUBJECT_LOC#:%0:##} {#BODY#: