Module::Install::RTx install paths

Hello,

While converting our customizations into proper extensions I discovered that
the installer, which I grabbed from other existing extensions, writes files
into both release as well as local code trees. This way modules from 'lib’
always go to rt/local/lib/RT, but everything from ‘html’ such as Mason
files, CSS, Javascript end up in rt/html instead of rt/local/html. The
culprit appears to be here:

$RT::LocalVarPath  ||= $RT::VarPath;
$RT::LocalPoPath   ||= $RT::LocalLexiconPath;
$RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
$RT::LocalLibPath  ||= "$RT::LocalPath/lib";

I am wondering if this is intentional for some reason or should
$RT::LocalHtmlPath actually be set to $RT::LocalMasonComponentRoot?

Regards,
Maciek

While converting our customizations into proper extensions I discovered that
the installer, which I grabbed from other existing extensions, writes files
into both release as well as local code trees. This way modules from ‘lib’
always go to rt/local/lib/RT, but everything from ‘html’ such as Mason
files, CSS, Javascript end up in rt/html instead of rt/local/html. The
culprit appears to be here:

What RT version are you running?

Modern versions of Module::Install::RTx install all extension data into
local/plugins/Extension-Name/.

If you’re seeing extension files installed into local/{lib,html} or
html/ then I suspect you’re using an old version of
Module::Install::RTx, or perhaps a very old version of RT.

Rather than copying inc/ from another extension, you’re better off
installing Module::Install::RTx from CPAN and then writing and running a
Makefile.PL which uses it. When you run it, it’ll populate inc/ with
the latest code. You should also make sure that a inc/.author directory
exists for module authors only since it will tell Module::Install to
regenerate files that it wouldn’t otherwise do.

This draft documentation for writing extensions may be of help:
https://github.com/bestpractical/rt/blob/4.0/writing-rt-extensions-doc/docs/writing-extensions.pod

Thomas,

Modern versions of Module::Install::RTx install all extension data into
local/plugins/Extension-Name/.

Looks like I was using an outdated version of the module. I have no
experience with these kinds of things in Perl, so thanks for all tips.

Regards,
Maciek