package Widget2; Construct Tk::Widget 'Widget2'; use Tk; use Tk::Frame; # go ahead and create elements in the widget, like it would be a # standalone app (don't forget to add the close button :D