in reply to Formatting dynamic method names
Perhaps it should be
Method 2: --------- for ( keys %hash ) { $object->${ \"set_$_" }( $hash{$_} ); }
Update: concerning the question, I would prefer first method. It explains itself, so it is clear what it is doing even for newbie. Second statement, though shorter, will require more time to read and understand for some persons.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Formatting dynamic method names
by clinton (Priest) on Oct 10, 2009 at 13:45 UTC |
In Section
Seekers of Perl Wisdom