Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: first "project"

by davidj (Priest)
on May 31, 2004 at 15:52 UTC ( #357810=note: print w/ replies, xml ) Need Help??


in reply to first "project"

I don't know about questions 2 and 3, so I will respond only to questions 1: "does size matter?"

I still have this perception that perl code should be able to be written in a one-liner

If your concern is to write a minimum amount of code, then there may be ways to make it "better". However, if your concern is efficiency, remember, less code does not necessarily equate to greater efficiency. Efficiency is guaranteed by using the best algorithm. (I learned this the hard way when learning C in college).

I have written a few Tk front-ends so I know what you mean about code getting long. It's the nature of Tk since you have to manually configure each widget. One thing I have done to reduce the bulkiness of my code is to store the widget configuration information in a .conf file. Then when I load the application, I read from the .conf file and use the $widget->configure() method to configure the widgets. Granted it takes a little extra time to load the application, but it does make the code more manageable.

hope this helps,
davidj


Comment on Re: first "project"
Download Code
Re: Re: first "project"
by eserte (Deacon) on Jun 01, 2004 at 15:27 UTC
    It's the nature of Tk since you have to manually configure each widget.
    You don't have to, rather use the option database. See the Tk::option manpage.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://357810]
help
Chatterbox?
and the web crawler heard nothing...

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

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





    Results (176 votes), past polls