NAME
Module::Install::RTx - RT extension installer
SYNOPSIS
In the Makefile.PL of the "RT-Extension-Foo" module:
use inc::Module::Install;
RTx 'RT-Extension-Foo';
WriteAll();
optionally add a
requires_rt('3.8.9');
to die if your RT version is too old during install
DESCRIPTION
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 "lib" and "t" directories.
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
"html,sbin".
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
requires_rt
Takes one argument, a valid RT version. If an attempt is made to install
on an older RT, it will die before Makefile creation.
rt_too_new
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.
CAVEATS
* Use full name when call RTx method in Makefile.PL, some magic has
been implemented in this installer to support RTx('Foo') for
'RTx-Foo' extension, but life proved that it's bad idea. Code still
there for backwards compatibility. It will be deleted eventually.
* installer won't work with RT 3.8.0, as it has some bugs new plugins
sub-system.
* layout of files has been changed between RT 3.6 and RT 3.8, old
files may influence behaviour of your extension. Recommend people
use clean dir on upgrade or guide how to remove old versions of your
extension.
ENVIRONMENT
RTHOME
Path to the RT installation that contains a valid lib/RT.pm.
SEE ALSO
Module::Install
AUTHORS
Best Practical Solutions
(Originally) Audrey Tang
COPYRIGHT
Copyright 2003, 2004, 2007 by Audrey Tang . Copyright
2008-2014 Best Practical Solutions
This software is released under the MIT license cited below.
The "MIT" License
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.