I've just added support for multiple class libraries, where formerly all classes had to be stored under /usr/local/lib/ThinObject/. This was unworkable in some situations, e.g., when operating as a mere user on a system, with no access to /usr/local/...
I made changes to the thinob.sh "enabler" program (formerly called tob.sh) and to the ThinObject.pm perl module to do this. In both cases, I define two arrays, named LIB and ROOT, as follows:
where LIB is the prefix and ROOT value the suffix, in all combinations and in order. LIB lists the "major" library locations, but in order of most specific to most general.
The ROOT values are just there to provide some alternative monikers for the thinobject class libraries. I had been using ThinObject, but recently decided (completely arbitrarily of course) that a lower case name would be better, perhaps more unixish, and why not shorter as well, and chose thinob as my preferred library root suffix. Since I'm using that form, I probably should change ROOT to:
ROOT=( thinob ThinObject tob )
An obvious capability to add would be a variable, e.g., ThinObjectLibRoot or something, so that additional libraries could be specified implicitly -- but I'm not at all sure of security or other implications, and don't need it myself (yet), so I have not done this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just added support for multiple class libraries, where formerly all classes had to be stored under /usr/local/lib/ThinObject/. This was unworkable in some situations, e.g., when operating as a mere user on a system, with no access to /usr/local/...
I made changes to the thinob.sh "enabler" program (formerly called tob.sh) and to the ThinObject.pm perl module to do this. In both cases, I define two arrays, named LIB and ROOT, as follows:
LIB=( ~/lib /usr/local/lib /usr/lib )
ROOT=( ThinObject thinob tob )
where LIB is the prefix and ROOT value the suffix, in all combinations and in order. LIB lists the "major" library locations, but in order of most specific to most general.
The ROOT values are just there to provide some alternative monikers for the thinobject class libraries. I had been using ThinObject, but recently decided (completely arbitrarily of course) that a lower case name would be better, perhaps more unixish, and why not shorter as well, and chose thinob as my preferred library root suffix. Since I'm using that form, I probably should change ROOT to:
ROOT=( thinob ThinObject tob )
An obvious capability to add would be a variable, e.g., ThinObjectLibRoot or something, so that additional libraries could be specified implicitly -- but I'm not at all sure of security or other implications, and don't need it myself (yet), so I have not done this.