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

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,

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://357810]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2017-09-26 15:27 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (296 votes). Check out past polls.