http://qs321.pair.com?node_id=11118348


in reply to Writing my first PERL/Tk megawidgit

"I cant find any concise examples showing what must be in the module, and where the perl subroutines must go."

Run the "Perl/Tk Widget Demonstration". In case you don't know, that's just widget from the command line; I usually run it in the background to free up the console (i.e. widget &). Near the bottom, you'll find "Sample Perl Mega-Widgets".

Also see the Tk documentation. The "Derived Widgets" section would be a good place to start.

In addition to those published sources of information, you can look at source code on your own computer. You can find the location of the modules by querying %INC. Here's how you'd find Tk.pm itself:

$ perl -E 'use Tk; say $INC{"Tk.pm"}'

For the mega-widget Tk::Balloon:

$ perl -E 'use Tk::Balloon; say $INC{"Tk/Balloon.pm"}'

— Ken