I think I need to explain what the concept behind this is.
What I want is a main script that runs a program (here called Main.pl).
However, users may want to add on functions to Main.pl and change things within the program, and then share this with other users. Instead of modifying the Main.pl code, I'd like a plug-in to be run (Child.pl here). That way someone could write a modification for Main.pl, and novice users could simply drop it into a plug-ins folder. Main.pl would then communicate with the scripts in the plug-ins folder. Does that make more sense? | [reply] |
| [reply] |
Hmmm. Well, first off, let me just say maybe using the HTML code was a bad example, because now everyone is thinking Template, and that was a just an example... I'm not actually trying to work with html here. Rather, Im trying to interrupt a running process in one script when it reaches a certain point, add more information into it, and then let it keep running on as normal. The first script, Main.pl, will be the one being interrupted. It will also search the plug-in directory an initialize any plug-ins existing in it. The plug-in would then insert it's own output into Main.pl's output at a certain point during Main.pl's execution. The output might be additional file checks, extra printing to data files, etc. Then Main.pl would continue to run.
What I need is some way for the plug-in the know where Main.pl is at in the execution process. And then I need it to be able to feed something into Main.pl when it reaches that point in the process (the point it's waiting for would be defined within the plug-in).
The whole reasoning behind this is that I work with a community that creates modifications for a very large script. The modifications can be applied automatically to the script's source files via a program written in Delphi that's been created for the community. However, the modifications work on the basic premise of "look for this line, then add this code after it," or "look for this line, and change it to this."
Well, if you install one mod that looks for a line of code and then changes it, and then attempt to install another mod looking to add something after the original line, it's not going to work because the original line was changed by the first mod. Plus, as easy as it is, people still have trouble understanding how to actually install these mods.
A plug-in system would eliminate the changing of the original source files, and hopefully prevent some of the compatibility issues within the community.
So does that make a little more sense? I hope so. Has nothing to do with templates or html at all, just to clarify. Thanks for taking the time.
| [reply] |