[Rt-devel] Help with Module::Install(::RTx)
Jesse Vincent
jesse at bestpractical.com
Mon Nov 9 10:17:48 EST 2009
On Mon, Nov 09, 2009 at 04:05:15PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> Hi RT Developers,
>
> I have a tiny RTx, one Callback, one html File and one perl module, let say:
>
> /html/Callbacks/RT-Extension-MyGreatExtension/Ticket/Element/Tabs/Default
> /html/Ticket/MyGreatExtension.html
> /local/lib/RT/Extension/MyGreatExtension/Name.pm
>
> i moved them (after testing a lot inside RT) to my homedir, lets say:
>
> ~/devel/MyGreatExtension-Source
>
> and tried like i read: h2xs -X -n RT::Extension::MyGreatExtension what ends up in a new SubDir:
h2x is not your friend here. You don't need it.
> Should i copy them by hand to this new subdir and add to MANIFEST? I read already in the list (from Kevin i think) that i also have manually add this part to the auto generated Makefile.PL:
>
> use inc::Module::Install;
> RTx('RT-Extension-MyGreatExtension');
> author('Torsten Brumm <mymail at email.com>');
> license('perl');
>
> &WriteAll;
This looks like a fine Makefile.PL, except that I'd generally recommend
RTx over RT-Extension.
You'll want to create that Makefile.PL and then these directories:
lib/
html/
html/Callbacks/RTx-MyGreatExtension/
html/RTx-MyGreatExtension/
Your extension lib should go in lib/RTx/MyGreatExtension.pm and have a
package line that reads "package RTx::MyGreatExtension;"
Rather than putting your .html file in Ticket, I'd recommend putting it
in RTx-MyGreatExtension/Ticket/
(note that to build your extension, you'll need to install
Module::Install::Admin and Module::Install::RTx from CPAN)
You'll need a MANIFEST containing a list of all the files in your
distribution.
Most everything else is optional.
Best,
Jesse
More information about the Rt-devel
mailing list