This is somehow a selfquestion about PN code... I was looking at the pnInit code, and found there are lots of simple "include" for classes.
Let's suppose for some strange bad luck somebody goes and does the same include on his/her modules... that's going to break the system - stop and die in lots of servers... "Can't redeclare class blah...", being also complicated to trace as maybe the class is included in another class which is refered from another file, well, you know.
So the question is, wouldn't it be better to apply a bit of "selfdeffensive" code and try to make it complicated to get broken, by, let's say, change the include directives with include_once ?
I think it's more meaningful, in the way that it makes more sense to ask a file to be included once during the execution of postnuke.
The same goes for example for some files where there are several includes in the middle of the code. Something like
Code
if (...) {
include(some class)
}
include(some class)
}
Trying to know which files are depending of each others with this style of coding is terribly difficult. I don't think the overhead is going to be excessive if that include is always at the top of the file, and it would improve readability and hence PN code quality.
So what do you think of these self-questions?
