my($self, $proto) = @_;
# Subclasses should all do this before doing anything else# $self->SUPER::_init(@_);my$paramCopy = {};
my$protoParams = $proto->_getParams;
foreachmy$key(keys %{$protoParams}){#TODO: some params are objects. Really need to instantiate new copies # here, but for now just take the references, as _init is not implemented # in many objects yet$paramCopy->{$key} = $protoParams->{$key};
}$self->attr('params', $paramCopy);