在描述数据库的面向对象模块中,应该将DB描述数据结构传递给派生类构造函数中的构造函数,还是应该创建(“虚拟”即动态)方法来创建数据结构并在构造函数中调用它们?data_desciptionclass Base: self.data_desciption = self.data_desciption_init() class Ba
我有类属性,例如某个基类中创建的对象的计数器,our $counter = Counter->new; # not just a counter in fact, so initializationbless {}sub get_counter {}
use base 'A';
B->get_counter();
我希望包B有他自己的</