Class::ehierarchy is a hierarchally ordered object that is intended to be used as a base class. This class allows you to define the relationship between a parent-child object and to ensure that an object is ordered to be destroyed, based on this relationship, rather than the sequence of breaches of the Perl reverse order based on the reference count.
This version of Class::ehierarchy 0.90 was completely rewritten, breaking the previous API. Some features have been lost, but some new features have been gained.
Sample code:
Package&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; Fooobj; Sub _initalize ($@) {my $obj = shift; my%args = @_; my $rv = 1; if (-t $args {FILE}) {_declprop ($obj, Ceh_priv | Ceh_scalar, ' counter '); $obj->property (' counter ', 1); $RV = _declprop ($obj, Ceh_pub | Ceh_scalar, keys%args); else {$rv = 0; return $RV; Sub _inccounter ($) {my $obj = shift; return $obj->property (' counter ', $obj->property (' counter ') + 1); }
Download Address: http://www.digitalmages.com/projects/ClassEHierarchy/files/Class-EHierarchy-0.90.tar.gz