All pastes #168914 Raw Edit

veritanuda

public text v1 · immutable
·published 2006-09-13 13:09 UTC
rendered paste body
# Figure out what the user is trying to do
    if ($Path[0]) {
        if (-e "$modules_dir/$Path[0]") {
            if (-e "$modules_dir/$Path[0]/handler.pl") {
                require "modules/$Path[0]/handler.pl";
            }
            else {
                print header(),
                      "Module '$Path[0]' doesn't have a perl handler.";
            }
        }
        elsif ($Path[0] =~ /\w/) {
            print header(),
                  "Unknown module:  $Path[0]";
        }