Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: first "project"

by davidj (Priest)
on May 31, 2004 at 15:52 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://357810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found