sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = bless { }, $class; while(@_) { my $property = shift; $self->$property(shift); } return $self; }