go ahead... be a heretic | |
PerlMonks |
Re: AppConfig variables and OOby Caillte (Friar) |
on Jan 10, 2001 at 20:34 UTC ( [id://50931]=note: print w/replies, xml ) | Need Help?? |
Consider the following:
Running this gives (on a 1ghz pc hobbled by Win2k):
Considering there are a million copies made of each the time difference isnt all that great. However, if all we wanted to do was code fast programs none of us would ever write OO :) In other words, use a variable if calling the object is too much work :) However there are many other reasons to code this way... have a look at This file and especially this file for some basic guidelines and explanation of OO programming.
In Section
Seekers of Perl Wisdom
|
|