for (@attribute_list) { my $sub = "package $package; sub get$_ { \$_[0]->get($_) }; "; eval $sub; }