<%perl> my $intake = $ENV{'QUERY_STRING'} || "base.html"; my (@chewing, $i, @spit, $whichfile); if ($intake ne "base.html") { @chewing = split(/\&/, $intake); $i = (@chewing); my $loop = 0; while ($loop <= $i) { if ($chewing[$loop] =~ /whereto/) { @spit = split(/=/, $chewing[$loop]); $whichfile = $spit[1]; } $loop++; } # $i--; # @spit = split(/=/, $chewing[$i]); # $whichfile = $spit[1]; } else { $whichfile = $intake; }
Current Version: 0.58
<& nav.html &>
<& $whichfile &>
<%init> ########FROM JIM'S CODE ########### # Set the path where perl looks for packages to include # the directory where this autohandler is, if we don't already have it my $directory = $m->current_comp->source_dir; push @INC, $directory unless grep(/$directory/,@INC); # Load the Colloseum.pm file at run time. # And make sure we reload this module; remove prior references to it. # Check out the documentation about @INC, %INC, "use", and "require" # (We can't say "use Colloseum" here; that happens at compile time.) # # This seems to give erratic behavior - I'm not quite sure what is going on. # delete $INC{'Colloseum.pm'} if exists $INC{'Colloseum.pm'}; # require Colloseum;