Before you even begin writing a publicly consumable Perl/Tk widget, check the Perl/Tk mega-widget home page at http://www.lehigh.edu/sol0/ptk/modlist, where you’ll learn about your responsibilities as a module writer. The idea is to stop duplication of effort and coordinate the naming, development, and testing of modules. It’s also important to keep the Perl/Tk mailing list firstname.lastname@example.org and the news group comp.lang.perl.tk advised of your module. You’ll get invaluable feedback that will make your final result more polished.
Assuming you’ve followed the protocol and have a pure Perl/Tk widget module ready for distribution, you must register yourself as a CPAN developer and get a CPAN ID. Link to http://www.perl.com/CPAN-local/modules/04pause.html to get registration and upload instructions.
With all the paperwork complete, you need to package your new module so it installs in the standard Perl manner:
We’ll use the NavListbox widget as our example in the next two sections. The first section details packaging the widget for CPAN and the second for ActiveState’s Perl Package Manager (PPM).
To begin, create a new, empty distribution directory and copy to it the widget module file, NavListbox.pm. For completeness, we need to populate the distribution directory with at least three more files, as shown in the next section. The files are MANIFEST, Makefile.PL, and ...