Re: On the fly "do" (require)

2000-08-05 Thread G.W. Haywood

Hi there,

On Wed, 26 Jul 2000 [EMAIL PROTECTED] wrote:

> I got some problem migrating me CGI to mod_perl.

I do not know if I understand your question, but you could
try looking at Apache::Registry to get your CGI scripts to
work under mod_perl.

Also look at

http://perl.apache.org/guide

73,
Ged.





On the fly "do" (require)‎

2000-07-25 Thread rami

Hope I asking this question on the right place.
ýI got some problem migrating me CGI to mod_perl.ý
ýI'm "require" parameter file on the fly using the user inputý
ýto decided which file to load.ý

ýLet say I got tree files:ý
ýmain.cgi, param1.pl, param2.plý

ýThe main.cgi load configuration parameters from one of theý
ýparam's file and then print the parameters to the browser.ý

ý- main.cgi ý
ý#!/usr/local/bin/perl -wý
ýuse strict;ý
ýmy ($forum,$back_url);ý
ýuse CGI;ý
ý$q = new CGI;ý
ý$forum = $q->param('forum');ý
ýdo "c:/home2/rami/www/forums/setups/".$forum.".setup"  ||ý
ý print("Can't require\n");ý

ýprint SOME HTML STUFF ...ý
ýprint "the forum is: $forum\n";ý
ýprint "back_url $back_url\n";ý
ýprint SOME HTML STUFF ...ý

ý-- param2.pl -ý
ý.ý
ý.ý
ý.ý
ý$back_url = "123";ý
ý.ý
ý.ý
ý.ý
ý-- param3.pl -ý
ý.ý
ý.ý
ý.ý
ý$back_url = "456";ý
ý.ý
ý.ý
ý---ý
ýThe phenomenon is that on every $forum number I loadý
ý$back_url (or any other variable) is allways null.ý

ýIs there a way to use my old CGI come with our massive rewrite?ý

ýRegards,ý
ýRami Addadyý
ý[EMAIL PROTECTED]ý