That's odd, I ran the script you provided, it didn't have any problems. Now that could be a problem with your Tk::TabFrame installation it seems, or even Tk installation. How did you install the module? Did you download and unpack the source, and then perl Makefile.PL, make install, make test to install the module?