Andrew Ho wrote: > > Hello, > > Apologies if this has been asked before; I searched the archives but > couldn't find a reference to this. It's been discussed in the context of > MVC design a while back, but I don't have a solid answer to the following > question: can you call an Apache::ASP page from an Apache::Registry script? > Couched in MVC terminology, can I forward control from a .pl controller to > a .asp template, and pass arguments in a natural way? > ...
The safest thing to do right now would probably be to do an external redirect to the ASP page like: Apache->request->header_out('Location', "script.asp?$ARGS"); I do not think you would be able to pull off an internal redirect, or you might, but there might be complications if the first script tried to read POST input on STDIN, and then the ASP script tried also, there would probably be a hang. You could also call the registry/cgi as an asp script directly and have access to the ASP API like: # cgi wrapper script.asp, works with inline includes ( DynamicIncludes 0 ) <% <!--#include file="script.pl"--> %> or <% do "script.pl"; %> then the script.pl could do all the ASP API calls it likes as in: # script.pl ... $Server->Transfer('redirect_to.asp', @args); ... If what you really want is to simply load an external ASP script as a template for further processing in the script.pl, and you only want to run script.pl as an Apache::Registry script, there is not an API for doing this currently. --Josh _________________________________________________________________ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com 1-714-625-4051