I'm doning something like this i.e. using include in many files :
myscript1.asp, myscript2.asp, myscript3.asp ... myscriptX.asp
================================================
<%
...code ...
<!--#include file=blah.inc-->
...code...
%>
currently I have have some vars that are used inside <included>-files but
has to declared into the outer script ( say myscript2.asp and
myscript4.asp), but on the other hand I don't need to define them in all
other scripts 'cause they don't use all of the functionality provided by
blah.inc ... and 'cause I'm under 'strict' I have to define those virables
in all scripts but not only in the script where I need them...
One way to resolve this i've just tried (but has to go to bed :")) is to do
the following :
myscript2.asp, myscript4.asp
================================================
<%
...code ...
my $varThatINeedOnlyAtMyScript2 = 'xxx';
<!--#include file=blah.inc-->
...code...
%>
In all others I doesn't define this var but into blah.inc I put the
following :
blah.inc
========
use vars qw($varThatINeedOnlyAtMyScript2);
$varThatINeedOnlyAtMyScript2 = '' unless $varThatINeedOnlyAtMyScript2;
so now all scripts are happy :"), but this seems to me very ugly solution is
there something more elegant...
=====
iVAN
[EMAIL PROTECTED]
=====
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]