Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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.


In reply to Re: Code Review Time! by thundergnat
in thread Code Review Time! by linuxkid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (6)
    As of 2014-12-22 02:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (110 votes), past polls