O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Packaging a Mega-Widget for Public Distribution

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,[7] 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 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:

% perl Makefile.PL
% make
% make test
% make install

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required