OOP
view release on metacpan or search on metacpan
298299300301302303304305306307308309310311312313314315316317318
CUSTOM
=> {}
});
Attention should be
given
to the B<PROTOTYPE> attribute in the above
illustration where we can see an example of how the
prototype
properties are
implemented.
The above illustrates how to define the various restrictions to a particular
property. Keep in mind that this is only the
prototype
so it does not directly
deal
with
data passed into a constructor. One way of seeing it is as a template
that is overlayed
with
the actual data from the constructor.
Providing a definition of a property is always optional. If none is provided then
various logical defaults apply. If one does not provide definitions then it will
be considered that the elements (or properties) in the
prototype
are not exclusive
but they are required. In other words one could add properties dynamically but the
constructor of the user class would need to have at the very least the properties
of the
prototype
passed to it.
The OOP class guesses that it is a property definition by finding the keyword
I<dataType> which happens to be the only reserved keyword (
for
a hash key). This means that
when
a user
( run in 0.308 second using v1.01-cache-2.11-cpan-454fe037f31 )