[rt-devel] Site Lib
darren chamberlain
darren at boston.com
Wed Jun 12 16:44:18 EDT 2002
* Jim Meyer <purp at wildbrain.com> [2002-06-12 12:54]:
> On Tue, 2002-06-11 at 18:58, Jesse Vincent wrote:
> > Your perl site_lib exists for this sort of purpose. I'd recommend packaging
> > addon modules with h2xs....
> >
> > 3.0 will likely have a local/lib which corresponds to local/WebRT
>
> We keep thinking about implementing this here; as we considered it
> last, we decided that it *should* be as easy as creating the directory
> and adding a "use lib" statement to everything in the bin directory.
> (and then we solve the problem some other way ;)
>
> Is it not that simple?
It is, more or less, as long as youo grok how Perl handles package
naming.
I've gotten in the habit of putting local modifications into the RTx::
namespace, and making standard perl-ish tarballs out of the stuff. The
path to RT is a Makefile.PL parameter:
$ perl Makefile.PL RT=/opt/rt2
$ make
# make install
Makefile.PL then does:
my %ARGV = map { split /=/, $_, 2 } grep /=/, @ARGV;
unshift @INC, $ARGV{'RT'};
I also add a use lib $ARGV{'RT'} to the top of the RTx:: modules as well
(they get preprocessed during the install step, using the %ARGV).
(darren)
--
Which is it: is man one of God's blunders, or is God one of man's
blunders?
-- Friedrich Nietzche
More information about the Rt-devel
mailing list