######################################################################## # Method: add_method # Use: Teaches a new method to an existing bucket # Created: 08/06/98 - MLN # Note: consider having it rewrite index.cgi if no target is supplied ######################################################################## sub add_method { local($new_method) = $in{"target"}; # source for new method stored in $in{"upfile"} -- # but don't make a local copy require "$method_dir/add_element.pl"; # to get &write_element # assume its a perl (.pl) file... # this should probably be more general RSN -- mln &write_element($method_dir,"$new_method.pl",$n{"upfile"}); &http_header("text/plain"); print "add_method: method $new_method ($new_method_file) added\n"; &log("add_method","OK","method $new_method ($new_method_file) added"); } 1;