Revision history for Perl extension Class-MOP.
-0.04
+0.04 Fri Feb. 3, 2006
* Class::MOP::Class
- some documentation suggestions from #perl6
* examples/
- added new examples:
- AttributesWithHistory
- -
+ - ClassEncapsultedAttributes
0.03 Fri Feb. 3, 2006
- converted to Module::Build instead of EU::MM
sub construct_instance {
my ($class, %params) = @_;
- #use Data::Dumper; warn Dumper \%params;
my $instance = {};
foreach my $current_class ($class->class_precedence_list()) {
$instance->{$current_class} = {}
$instance->{$current_class}->{$attr_name} = $val;
}
}
- #use Data::Dumper; warn Dumper $instance;
return $instance;
}
=head1 DESCRIPTION
+This is an example metaclass which encapsulates a class's
+attributes on a per-class basis. This means that there is no
+possibility of name clashes with inherited attributes. This
+is similar to how C++ handles its data members.
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to Yuval "nothingmuch" Kogman for the idea for this example.
+
=head1 AUTHOR
Stevan Little E<lt>stevan@iinteractive.comE<gt>