[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Recursive Imports
From: |
Russell Adams |
Subject: |
Recursive Imports |
Date: |
Thu, 29 Jul 2004 20:45:41 -0500 |
User-agent: |
Mutt/1.4.2.1i |
I've been experimenting with using individually executable scripts to
split up my configurations into smaller logical components. Some
scripts still depend on others though, and when the main cfagent.conf
runs, it imports everything required.
Turns out that when I add imports to make scripts able to run on their
own individually, cfagent loops on the imports that reference each
other.
For example:
file1
----------
import:
file2
file2
----------
import:
file 1
Cfagent gets stuck in a loop.
The best option around this I see is defining a class in each script,
(ie: HaveScriptname), and then using a conditional to indicate that
the no import should occur if that class is already defined.
file1
----------
classes:
HaveFile1 = ( any )
import:
!HaveFile2:
file2
This prevents looping.
Sounds like C defines. ;]
Comments?
-----------------------------
Russell Adams
RLAdams@AdamsInfoServ.com
http://www.adamsinfoserv.com/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Recursive Imports,
Russell Adams <=