http://www.perlmonks.org?node_id=959806


in reply to Code Review Time!

Umm. wow. You've got some problems here. Ok, to very narrowly answer your question; the error:

No -label at C:/strawberry/perl/site/lib/Tk/Widget.pm line 256.

is caused by your menu commands not having any -label parameter. -text (or in this case, text) is not a valid parameter name for a Tk menu command. Look up valid parameters in perldoc Tk::Menu under $menu->add(type, ?option, value, option, value, ...?)

Some other problems that jumped out after a brief perusal:

There's no menu method seperator, it is spelled separator. Weird since you have it spelled correctly in some places, not in others.

The array and value being pushed are reversed in several push operations. push @list, $id; not push $id, @list;

You are missing a sigil on $key in line 237: $conf->{$key} = $value; not $conf->{key} = $value;

Seriously, activate the warnings and strict pragmas and fix or at least investigate everything that they report. If you are a fairly new Perl programmer it is worth it. Yes, turning them on will make perl complain about things that are not necessarily "wrong", but it will reduce the effort you need to spend debugging by orders of magnitude.