Hm. I cannot see the point in instantiating an object that will never be used. Better to leave the variable as undef until it is needed and then initialise it.
To my way of thinking, instantiating uninitialised objects is as short sighted as declaring variables in C without initialising them.
And auto-initialising on demand sounds even worse. Maybe I'd just need to see a real-world example of use to convince me otherwise, but I am sceptical.
In reply to Re^3: Perl Object Initilization
by BrowserUk
in thread Perl Object Initilization
by PyrexKidd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |