#1: sub new { #2: my $class = shift; #3: my $self = { }; #4: while (scalar(@_)) { #5: $self->{$_[0]} = $_[1]; shift, shift; #6: } #7: bless $self, ref($class)||$class; #8: }