perl中bless的理解(zz) z

bless有两个参数:对象的引用、类的名称。 类的名称是一个字符串,表明了类的类型信息,这是理解bless的关键。 所谓bless就是把 类型信息 赋予 实例变量。 程序包括5个文件: person.pm :实现了person类 dog.pm :实现了dog类 bless.pl : 正确的使用bless bless.wrong.pl : 错误的使用bless bless.cc : 使用C++语言实
相关文章
相关标签/搜索