[ 源代码: libclass-data-accessor-perl ]
软件包:libclass-data-accessor-perl(0.04004-4)
libclass-data-accessor-perl 的相关链接
Debian 的资源:
下载源码包 libclass-data-accessor-perl:
- [libclass-data-accessor-perl_0.04004-4.dsc]
- [libclass-data-accessor-perl_0.04004.orig.tar.gz]
- [libclass-data-accessor-perl_0.04004-4.debian.tar.xz]
维护小组:
外部的资源:
- 主页 [metacpan.org]
相似软件包:
- libclass-accessor-class-perl
- libclass-accessor-perl
- libobject-accessor-perl
- libclass-accessor-lvalue-perl
- libclass-accessor-named-perl
- libclass-accessor-chained-perl
- libobject-container-perl
- libclass-accessor-children-perl
- libclass-accessor-grouped-perl
- libclass-singleton-perl
- liblexical-accessor-perl
Inheritable, overridable class and instance data accessor creation
Class::Data::Accessor is the marriage of Class::Accessor and Class::Data::Inheritable into a single module. It is used for creating accessors to class properties that is overridable in subclasses as well as in class instances.
For example:
Pere::Ubu->mk_classaccessor('Suitcase');
will generate the method Suitcase() in the class Pere::Ubu.
This new method can be used to get and set a piece of class property.
Pere::Ubu->Suitcase('Red'); $suitcase = Pere::Ubu->Suitcase;