[Rt-devel] Help with Module::Install(::RTx)

Brumm, Torsten / Kuehne + Nagel / Ham MI-ID torsten.brumm at Kuehne-Nagel.com
Mon Nov 9 11:32:03 EST 2009


OK, finally done, if anybody likes to test: http://github.com/tbrumm/RT-Extension-ShowRelations

Torsten 

-----Ursprüngliche Nachricht-----
Von: rt-devel-bounces at lists.bestpractical.com [mailto:rt-devel-bounces at lists.bestpractical.com] Im Auftrag von Brumm,Torsten / Kuehne + Nagel / Ham MI-ID
Gesendet: Montag, 9. November 2009 16:36
An: Jesse Vincent
Cc: Rt-devel at lists.bestpractical.com
Betreff: Re: [Rt-devel] Help with Module::Install(::RTx)

Thanks to all for this hints, now i will go and create my first RTx :-))

Torsten 


Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



-----Urspruengliche Nachricht-----
Von: Jesse Vincent [mailto:jesse at bestpractical.com]
Gesendet: Montag, 9. November 2009 16:18
An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Cc: Rt-devel at lists.bestpractical.com
Betreff: Re: [Rt-devel] Help with Module::Install(::RTx)




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/Defa
> ult
> /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

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


More information about the Rt-devel mailing list