#!/usr/local/bin/perl -w use strict; use warnings; use Tk; use CoolFrame; my $mw = MainWindow->new(); $mw->geometry( ); my $frame = $mw->CoolFrame( -bordercolor => 'red', -background=> 'white', )->pack(-padx => 5, -pady => 5); # THIS WORKS my $button = $frame->{'inner'}->Button( -text=> "Exit", -command=> sub{ exit; }, )->pack(-padx => 5, -pady => 5); # THIS IS WHAT I WOULD LIKE TO DO! # my $button = $frame->Button( # -text=> "Exit", # -command=> sub{ exit; }, # )->pack(-padx => 5, -pady => 5); MainLoop(); 1; __END__