thens has asked for the wisdom of the Perl Monks concerning the following question:
I need some suggestion/advice on creating a config/rules files for an application that Iam developing. The key requirements being
We basically want to process a object hierarchy. The processing rules will be taken as input in the form of a config file. The rules can be either inluce rules/exclude rules. The rules can apply to single object or a class of objects and any rules applied to the top level should descend down the levels of the tree.
I will illustrate that with an example. Let us assume Iam creating a visa processing application. We can organize the data in hierarchy like
NOTE Even though rule #1 says all people from CountryB can get a visa, the rule #3 overrides it with saying only people whose state is not 'xx' can get a visa
Is there a generic module or design concept available that I can reuse. I was thinking of something like a sequence of SQL select like statements that will express this. But Iam not sure how it can take care of the overrides by the rules that follow. If this can be achieved by a perl data file with multilevel hash, I have no issues. I guess a known syntax(Perl/SQL...) will avoid the overhead of learning a new representation scheme.
Any pointers to similar work or suggestions are welcome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Suggestions for design of a config/rules file
by dimar (Curate) on Jun 09, 2004 at 19:24 UTC | |
|
Re: Suggestions for design of a config/rules file
by halley (Prior) on Jun 09, 2004 at 17:42 UTC | |
by Plankton (Vicar) on Jun 09, 2004 at 18:00 UTC | |
by halley (Prior) on Jun 09, 2004 at 18:11 UTC | |
|
Re: Suggestions for design of a config/rules file
by davidj (Priest) on Jun 09, 2004 at 18:10 UTC | |
by thens (Scribe) on Jun 09, 2004 at 18:14 UTC | |
|
Re: Suggestions for design of a config/rules file
by jZed (Prior) on Jun 09, 2004 at 18:17 UTC | |
|
Re: Suggestions for design of a config/rules file
by stvn (Monsignor) on Jun 09, 2004 at 21:21 UTC | |
|
Re: Suggestions for design of a config/rules file
by toma (Vicar) on Jun 10, 2004 at 07:35 UTC |