Are you looking for something like:
for my $argument ( keys %args ) { $self->$argument( $args{ $argument } ) if exists $hash{ '_' . $argument }; }
As a side note, I prefer to generate accessors at compile-time without using AUTOLOAD when possible. Unless you predeclare all of the methods you're generating with subs or provide your own can(), you've made life more difficult for users of your code.
In reply to Re: Calling arbitrary method from new
by chromatic
in thread Calling arbitrary method from new
by mrborisguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |