Module::Install::RTx - RT extension installer
In the Makefile.PL of the
use inc::Module::Install; RTx 'RT-Extension-Foo'; WriteAll();
optionally add a
to die if your RT version is too old during install
This Module::Install extension implements a function,
RTx, that takes the extension name as the only argument.
It arranges for certain subdirectories to install into the installed RT location, but does not affect the usual
The directory mapping table is as below:
./bin => $RT::LocalPath/bin ./etc => $RT::LocalPath/etc/$NAME ./html => $RT::MasonComponentRoot ./po => $RT::LocalLexiconPath/$NAME ./sbin => $RT::LocalPath/sbin ./var => $RT::VarPath/$NAME
Under the default RT3 layout in /opt and with the extension name
Foo, it becomes:
./bin => /opt/rt3/local/bin ./etc => /opt/rt3/local/etc/Foo ./html => /opt/rt3/share/html ./po => /opt/rt3/local/po/Foo ./sbin => /opt/rt3/local/sbin ./var => /opt/rt3/var/Foo
By default, all these subdirectories will be installed with
make install. you can override this by setting the
WITH_SUBDIRS environment variable to a comma-delimited subdirectory list, such as
Alternatively, you can also specify the list as a command-line option to
Makefile.PL, like this:
perl Makefile.PL WITH_SUBDIRS=sbin
This module also provides the following helper functions
Takes one argument, a valid RT version. If an attempt is made to install on an older RT, it will die before Makefile creation.
Takes an RT version and prevents this module from being installed on any version of RT equal to or newer than that. Useful if a particular release of an extension only works on 4.0.x but not 4.2.x.
Takes an optional second argument which allows you to specify a custom error message. This message is passed to sprintf with two string arguments, the current RT version and the version you specify.
Path to the RT installation that contains a valid lib/RT.pm.
Best Practical Solutions
(Originally) Audrey Tang <email@example.com>
Copyright 2003, 2004, 2007 by Audrey Tang <firstname.lastname@example.org>. Copyright 2008-2014 Best Practical Solutions
This software is released under the MIT license cited below.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.