Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Non-standard Perl Module Locations
- Date: Wed, 12 Mar 2008 12:39:43 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: [tlug] Non-standard Perl Module Locations
- User-agent: Mutt/1.5.17 (2007-11-01)
I need some advice from folks with a fair amount of knowledge of perl workings. Here at Starling we have an build/install/test framework called QAM (http://www.starling-software.com/en/qam.html) that we use for our projects. A particular goal of it is to let us include sources for things such as libraries, modules for scripting languages, and so on within a project, and have the project build its own local copies of these so that we don't have to worry about what is or isn't installed (or what versions are installed) on development and production servers. (Anybody who's ever seen an entire web application break due to someone changing a system php.ini file setting will understand where I'm coming from here.) We're all set up for Ruby use already; you just make sure you, e.g., require File.expand_path(__FILE__ + "/../../qam") where the argument to expand_path is the release directory for this particular installation of the project, and now you're all set up to use the usual stuff under that release directory, release/lib/ruby/1.8, release/lib/ruby/site_ruby/1.8, linking against shared libraries in release/lib, etc. etc. Now we need to do something similar with perl, and I'm wondering what the standard structure for perl library directories is, and what the best way is to tack the directories from our release dir (the structure of which generally resembles /usr/local as much as possible) on to the front of search paths and so on. For example, the ruby code is pretty simple: d = QAM.dirs $LOAD_PATH.unshift(d.rubylib_sitearch) $LOAD_PATH.unshift(d.rubylib_site) $LOAD_PATH.unshift(d.rubylib_arch) $LOAD_PATH.unshift(d.rubylib) ENV['PATH'] = d.release('bin') + ':' + ENV['PATH'] where the QAM object is set up with a dirs method that returns a dirs object that knows, among other things, about all of the various locations of stuff under our release directory (e.g., d.rubylib is /.../release/lib/ruby/1.8/). Thoughts and opinions? cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] Non-standard Perl Module Locations
- From: David Shanahan
- Re: [tlug] Non-standard Perl Module Locations
- From: Attila Kinali
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Freely distributable Japanese capable utf8 font?
- Next by Date: Re: [tlug] Freely distributable Japanese capable utf8 font?
- Previous by thread: Re: [tlug] Expect: looping until there is no more input from spawn
- Next by thread: Re: [tlug] Non-standard Perl Module Locations
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links