You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bill Moseley <mo...@hank.org> on 2002/12/19 00:01:05 UTC
Apache::exists_config_define in 1.x?
I want to test for -D in a <perl> section.
I see in the docs that in mp2 you can use Apache::exists_config_define() to
test if a define is set.
How do I test if a define is set in 1.x?
Thanks,
--
Bill Moseley
mailto:moseley@hank.org
Re: Apache::exists_config_define in 1.x?
Posted by Bill Moseley <mo...@hank.org>.
At 03:01 PM 12/18/02 -0800, Bill Moseley wrote:
>I want to test for -D in a <perl> section.
Doh!, my test was causing the problem, not the fetching of the define!
<perl>
use Apache();
my $msg = Apache->define('TEST') ? "Testing" : "Not testing";
push @{ $Location{"/"}->{PerlSetVar} }, ['Testing', $msg];
</perl>
This works better:
my $msg = Apache->define('TEST') ? "Testing" : "Not_testing";
--
Bill Moseley
mailto:moseley@hank.org