Re: Different accessor names?
[prev]
[thread]
[next]
[Date index for 2005/07/25]
>>>>> "Kaare" == Kaare Rasmussen <kar@xxxxxxxx.xx> writes:
Kaare> I can't see a way to have different accessor and mutator names,
Kaare> depending on the calling class.
What do you mean "calling class"?
An accessor or mutator is associated with the CDBI-derived class, not
with anyone who uses it. This is absolutely necessary, if you think
about it. If I have an object blessed into class Foo::Bar, the
accessor and mutator names are looked up in Foo::Bar (and
parents)... nowhere else.
Perhaps what you want is a class of your own creation that "wraps" a
CDBI-based object that translates the accessors and mutators during a
delagation. However, none of the ->has_a and ->has_many calls defined
on the base classes will generate your wrapper class, and that's a
good thing.
You're probably solving an unsolvable problem. Can you back up
a step and say *why* you need to do this?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|
|
Re: Different accessor names?
merlyn (Randal L. Schwartz) 18:46 on 25 Jul 2005
|