Module...l::RTx(3pm)
๐ NAME ๐
Module::Install::RTx โ the RT extension installer, bestie. It's a Module::Install extension (from the User Contributed Perl Documentation shelf, iykyk) that handles all the fiddly bits of dropping an RT extension into a real RT install โจ
๐ธ SYNOPSIS ๐ธ
So in the Makefile.PL of the RT-Extension-Example module, you'd do this:
use inc::Module::Install;
RTx 'RT-Extension-Example';
requires_rt '5.0.0';
rt_too_new '6.0.0';
WriteAll();
โจ DESCRIPTION โจ
Okay so this Module::Install extension implements a whole lil toolbox of functions for installing RT extensions. Let's go one by one ๐
๐ RTx 'extension name'
This function arranges for the following directories to be installed, if they exist (and assuming you called RTx('RT-Extension-Example')):
./bin => $RT::LocalPluginPath/RT-Extension-Example/bin
./etc => $RT::LocalPluginPath/RT-Extension-Example/etc
./html => $RT::LocalPluginPath/RT-Extension-Example/html
./lib => $RT::LocalPluginPath/RT-Extension-Example/lib
./po => $RT::LocalPluginPath/RT-Extension-Example/po
./sbin => $RT::LocalPluginPath/RT-Extension-Example/sbin
./static => $RT::LocalPluginPath/RT-Extension-Example/static
./var => $RT::LocalPluginPath/RT-Extension-Example/var
It also accepts an optional argument hashref after the extension name, with the following keys ๐
๐ deprecated_rt
If you set it to a true value, it skips the enforced RT-4.0.0 minimum version check ๐ซฃ
You should set aperl_versionif using this option andrequires_rt(), becauserequires_rtonly handles figuring our what perl you need if you're on RT 4.0.0 or higher.
(That's a direct quote, bestie, not a typo on my end โ the manpage says "figuring our". Living for the honesty.)
๐ฆ no_readme_generation
If set to a true value, it will not call readme_from on the extension's primary perl module. No readme, no problem โจ
๐ requires_rt version
Takes one argument: a valid RT version. If somebody tries to install on an RT that doesn't measure up to that version, it will die before the Makefile even gets created. Dramatic? Yes. Effective? Also yes ๐
๐ง requires_rt_plugin RT::Extension::Example [, version]
This one makes sure the given RT extension (plus optional version) is actually installed in the target RT instance. And why not just use requires, you ask? Because RT extensions are literally not in @INC, that's why. requires simply cannot do this, periodt.
๐ฅ rt_too_new version [, message]
Takes one argument โ a valid RT version โ and stops this module from being installed on any version of RT that's equal to or newer than that. Super useful when one particular release of an extension only works on 4.0.x but not 4.2.x, and you want it to know its lane.
It also takes an optional second argument so you can specify your own custom error message. That message gets passed to sprintf with two string arguments: the current RT version and the version you specified. Custom tea, served hot โ
โญ initialdata_requires_plugin
If set to a true value, the generated initdb Makefile target will verify that the plugin is enabled in RT_SiteConfig.pm before inserting initial data. This is useful when initialdata depends on the plugin being loaded โ like, say, it references a new lifecycle definition or other features registered by the plugin. Vibe check before the data goes in ๐
๐ remove_files
If set to a true value, then during installation any files listed in a remove_files file will be removed from the destination directories. This feature exists for removing files that have been deleted or moved in the current version โ because leaving the old version in place when you upgrade can cause problems. Cleanup era ๐
RTx looks for a remove_files file in the etc/upgrade directory of the distribution. The format of the remove_files file is as follows:
package Module::Install::RTx;
@remove_files = qw(
html/dir/file_to_remove
);
1;
The file locations are relative to the distribution. The destination directory prefix gets added automatically โ no need to do that math yourself, bestie ๐งฎ
โ ๏ธ CAVEATS โ ๏ธ
- Use the full name when calling the RTx method in
Makefile.PL; whileRTx('Foo')was once supported, it is no longer. In loving memory ofRTx('Foo')๐ฏ๏ธ
๐ ENVIRONMENT ๐
RTHOMEโ path to the RT installation that contains a validlib/RT.pm. That's the one, the only, the connector ๐ซถ
๐ EXAMPLES ๐
Wanna install an extension that makes use of this installer? Say less:
perl Makefile.PL RTHOME=/opt/rt6
This will install all subdirs into the $RT::LocalPluginPath dir as configured in RT::Generated. Iconic ๐
And if you'd rather install an extension into the (vendor) plugin path:
perl Makefile.PL RTHOME=/opt/rt6 INSTALLDIRS=vendor
This one installs all subdirs into the $RT::PluginPath, which is specifically meant for plugins that get installed through other packaging utils like APT or RPM. Packaging-girlies, this one's for you ๐
๐ SEE ALSO ๐
Module::Installhttp://www.bestpractical.com/rt/
๐ซถ AUTHORS ๐ซถ
- Best Practical Solutions
- (Originally) Audrey Tang
<cpan@audreyt.org>
๐ COPYRIGHT ๐
Copyright 2003, 2004, 2007 by Audrey Tang <cpan@audreyt.org>. Copyright 2008-2026 Best Practical Solutions
This software is released under the MIT license cited below. Here it is, verbatim, no edits, because legal text stays untouched, fr fr:
๐ 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.
and that's the whole page, bestie ๐ this lil number is perl v5.40.1, dated 2026-04-25 โ go forth and install your extensions, you absolute main character โจ๐
๐ฆ where this page comes from
- ubuntu stonking: libmodule-install-rtx-perl 0.45-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms