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?? |
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
In Section
Seekers of Perl Wisdom
|
|