#! /usr/bin/wml <: use strict; :> <: use warnings; :> #use "perl-globals.wmi" #use "links.wmi" #use "versions.wmi" #use "navigation.wmi" # #
<:{ my %navigation; my @keys; while (@navigation) { my $key = shift @navigation; my $val = shift @navigation; push @keys, $key; $navigation{$key} = $val; } for my $key (@keys) { my $page = $WML_SRC_FILENAME; $page =~ s/\.wml//; if ($page ne $key) { if (-e "$(DOCROOT)/$(LANG)/$key.wml") { printf '%s'."\n", stripDotSlashs("$(DOCROOT)/$key.html.$(LANG)"), $navigation{$key}; } elsif ($key =~ /^http/) { printf '%s'."\n", $key, $navigation{$key}; } else { printf '%s'."\n", stripDotSlashs("$(DOCROOT)/$key.html"), $navigation{$key}; } } else { printf '%s'."\n", $navigation{$key}; } } }:> |