>>>>> "Stuart" == Stuart Watt <sw...@infobal.com> writes:
Stuart> In our application, we have two parts - an indexing system Stuart> that builds a set of databases, and a front end based on Stuart> Catalyst. The issue we are facing is that each generated Stuart> deployment runs almost exactly the same code, apart from Stuart> needing different database references, and maybe a little Stuart> additional Template-Toolkit stuff to provide custom logos, Stuart> search configuration data, etc. Stuart> What we ended up doing was using a new environment variable, Stuart> *_SITE_ROOT, which points to an individual site's deployment Stuart> base; this is effectively combined with *_HOME in a search Stuart> path for TT files and for configuration files. On a few rare Stuart> occasions we also add a local deployment lib directory Stuart> @INC. This means we can maintain all the deployments in Stuart> parallel, even when they contain different data. Stuart> The only substantive change we needed was in our subclass of Stuart> Catalyst::Plugin::ConfigLoader, which overrides find_files Stuart> to try the SITE_ROOT directory first, then HOME, for each Stuart> file previously identified - these are generally the config Stuart> file with and without the local suffix. It's the only way we Stuart> found of achieving a directory level separation between the Stuart> local deployment and the shared code base. Stuart> My question: is there an easier/better way to do this? If Stuart> not, I'd be keen to turn this into a patch, and rename stuff Stuart> where I get better suggestions. I'm confused as to what you're trying to achieve. From what I understood, what you're doing is equivalent to copying the source tree around (which is what you call a "deployment") and using a different configuration for each copy. If that's what you're trying to do, I'd say it's easier/saner to just maintain different configurations for each deploy type in the repo itself, then use some mechanism, like symlinks, or CATALYST_CONFIG to switch between them in specific deploys. -- Eden Cardim Need help with your Catalyst or DBIx::Class project? Code Monkey http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://edenc.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/