sub init { my $self = shift; my $param = ref $_[0] ? shift : {@_}; if ($param) { for (keys %$param) { $self->{$_} = $param->{$_}; } } }