[Chicago-talk] Proper encapsulation
me at heyjay.com
Fri Jan 21 22:01:56 PST 2005
Hi, I'm using Class::Accessor, it provides a method ->mk_accessors
(which ironically creates setters and getters for your class). Anyway,
I think typically you'd invoke this from the class, but you can do it
from the code that instatiates the class.
use base qw/Class::Accessor/;
my $o = SomeClass->new;
My question is: does creating the accessors from outside the class
violate OO principles, or is acceptable since the functionality is provided?
More information about the Chicago-talk