"overriden attribute-names" are not dramatic, because every attribute
gets its classname prepended like "Object::attribute" into the hash
representation of the object.
But you must be aware that when initializing via new( public => ),
alwas the first parent attribute is used for the initalization.
new( Parent1::field => 'bla', Parent2::field => 'blabla' );
NAME
Class::Maker - classes, reflection, schemas, serialization, attribute- and multiple inheritance
SYNOPSIS
use Class::Maker qw(:all);
class Something;
class Person,
{
isa => [ 'Something' ],
public =>
{
scalar => [qw( name age internal )],
},
private
{
int => [qw( internal )],
},
};
sub Person::hello
{
my $this = shift;
$this->_internal( 2123 ); # the private one
printf "Here is %s and i am %d years old.\n", $this->name, $this->age;
};
my $p = Person->new( name => Murat, age => 27 );
$p->hello;
DESCRIPTION
This package descibes the default constructor functionality. It is central to Class::Maker because during its call reflection, initialization, inheritance gets handled.
SPECIAL METHODS
sub _arginit : method
Once this method exists in the package of the class it is called right after new() was dispatched. It is generally for the modification of the @_
arguments to a convinient way new()
can handle it (It always expects a hash, but with this function one could translate an array to the hash).
sub _preinit : method
sub _postinit : method
<& /maslib/signatures.mas:author_as_pod, &>