in reply to Coding Perl With Style
Now, is OOP going to solve all of your problems? No. Check out Big Ball of Mud. OOP is just the tool, the results depend upon the coder wielding it.
Second question - yes, it will remain a 'constant' and you will get a run time error if you try and change it. And i didn't know why until wog said it. ;)
To elaborate more, this is a way i would do it:
Providing accessor methods tends to keep folks from trying to change the guts, but not always.package Foo; use constant BAR => 27; sub bar { return BAR }; 1;
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: Coding Perl With Style
by Biker (Priest) on Nov 27, 2001 at 13:43 UTC |